I'm a doctor, not a mechanic
UE3:Weapon (UT3)
From Unreal Wiki, The Unreal Engine Documentation Site
Contents |
- Package:
- Engine
- Direct subclass:
- GameWeapon
- This class in other games:
- RTNP, U1, U2, U2XMP, UDK, UE2Runtime, UT, UT2003, UT2004
| This is an auto-generated page and may need human attention. Please remove this tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Base Weapon implementation. Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
[edit] Properties
[edit] Property group 'Weapon'
[edit] DefaultAnimSpeed
Type: float
When no duration is specified, speed to play anims.
Default value: 1.0
[edit] EquipTime
Type: float
How long does it take to Equip this weapon
Default value: 0.33
[edit] FireInterval
Holds the amount of time a single shot takes
[edit] FireOffset
Type: Object.Vector
Holds an offest for spawning protectile effects.
[edit] InstantHitDamage
How much damage does a given instanthit shot do
[edit] InstantHitMomentum
momentum transfer scaling for instant hit damage
[edit] Mesh
Type: MeshComponent
Modifiers: editinline
Weapon Mesh
[edit] PutDownTime
Type: float
How long does it take to put this weapon down
Default value: 0.33
[edit] Spread
How much of a spread between shots
[edit] WeaponRange
Type: float
Range of Weapon, used for Traces (InstantFire, ProjectileFire, AdjustAim...)
Default value: 16384.0
[edit] Internal variables
[edit] AIRating
Type: float
Default value: 0.5
[edit] bCanThrow
Type: bool
Can player toss his weapon out? Typically false for default inventory.
Default value: True
[edit] bInstantHit
Type: bool
[edit] bMeleeWeapon
Type: bool
[edit] bWeaponPutDown
Type: bool
Set to put weapon down at the end of a state. Typically used to change weapons on state changes (weapon up, stopped firing...)
[edit] CachedMaxRange
Type: float
Cache MaxRange of weapon
[edit] CurrentFireMode
Type: byte
Current FireMode
[edit] FiringStatesArray
Array of firing states defining available firemodes
[edit] InstantHitDamageTypes
Type: array<class<DamageType> >
DamageTypes for Instant Hit Weapons
[edit] Priority
Type: float
Modifiers: databinding, config
Configurable weapon priority. Ties (mod weapons) are broken by GroupWeight
Default value: -1.0
[edit] ShouldFireOnRelease
AI Hints
[edit] WeaponFireTypes
Type: array<EWeaponFireType>
Defines the type of fire (see Enum above) for each mode
[edit] WeaponProjectiles
Type: array<class<Projectile> >
The Class of Projectile to spawn
[edit] Default values
| Property | Value |
|---|---|
| bOnlyDirtyReplication | False |
| bReplicateInstigator | True |
| ItemName | "Weapon" |
| RespawnTime | 30.0 |
[edit] Enums
[edit] EWeaponFireType
This enum defines the firing type for the weapon. EWFT_InstantHit - The weapon traces a shot to determine a hit and immediately causes an effect EWFT_Projectile - The weapon spawns a new projectile pointed at the crosshair EWFT_Custom - Requires a custom fire sequence
- EWFT_InstantHit
- EWFT_Projectile
- EWFT_Custom
- EWFT_None
[edit] Functions
[edit] Events
[edit] Destroyed
Overrides: Inventory.Destroyed
Event called when weapon actor is destroyed
[edit] GetMuzzleLoc
This function returns the world location for spawning the visual effects
[edit] IsFiring
Returns true if the weapon is firing, used by AI
[edit] Other instance functions
See Weapon instance functions.
[edit] States
[edit] Active
Modifiers: simulated
[edit] Active.BeginState
Overrides: Object.BeginState (global)
Initialize the weapon as being active and ready to go.
[edit] Active.Activate
Overrides: Activate (global)
Activate() ignored since already active
[edit] Active.BeginFire
Overrides: BeginFire (global)
Override BeginFire so that it will enter the firing state right away.
[edit] Active.ReadyToFire
ReadyToFire() called by NPC firing weapon. bFinished should only be true if called from the Finished() function
[edit] Active.TryPutDown
Overrides: TryPutDown (global)
Put the weapon down
[edit] Inactive
State Inactive Default state for a weapon. It is not active, cannot fire and resides in player inventory.
Modifiers: auto
[edit] Inactive.BeginState
Overrides: Object.BeginState (global)
Clear out the PendingFires
[edit] Inactive.ServerStartFire
Overrides: ServerStartFire (global)
When StartFire() is called on a client, it replicates the start by calling ServerStartFire. This begins the event on server. Server side actors (such as bots) should not call ServerStartFire directly and should instead call StartFire().
Network: Dedicated Server only, or Listen Server for remote clients.
[edit] Inactive.ServerStopFire
Overrides: ServerStopFire (global)
When StopFire is called on a client, ServerStopFire is used to initiate the sequence on the server. Network: Dedicated Server only, or Listen Server for remote clients.
[edit] Inactive.StartFire
Overrides: StartFire (global)
do not allow firing in the inactive state
[edit] Inactive.TryPutDown
Overrides: TryPutDown (global)
can't put down an inactive weapon
[edit] PendingClientWeaponSet
[edit] PendingClientWeaponSet.BeginState
Overrides: Object.BeginState (global)
Event called when weapon enters this state
[edit] PendingClientWeaponSet.EndState
Overrides: Object.EndState (global)
Event called when weapon leaves this state
[edit] PendingClientWeaponSet.PendingWeaponSetTimer
[edit] WeaponEquipping
State WeaponEquipping The Weapon is in this state while transitioning from Inactive to Active state. Typically, the weapon will remain in this state while its selection animation is being played. While in this state, the weapon cannot be fired.
Modifiers: simulated
[edit] WeaponEquipping.BeginState
Overrides: Object.BeginState (global)
Called immediately when entering a state, while within the GotoState() call that caused the state change (before any state code is executed).
[edit] WeaponEquipping.EndState
Overrides: Object.EndState (global)
Called immediately before going out of the current state, while within the GotoState() call that caused the state change, and before BeginState() is called within the new state.
[edit] WeaponEquipping.Activate
Overrides: Activate (global)
Activate() ignored since already becoming active
[edit] WeaponEquipping.WeaponEquipped
[edit] WeaponFiring
Modifiers: simulated
[edit] WeaponFiring.BeginState
Overrides: Object.BeginState (global)
Called immediately when entering a state, while within the GotoState() call that caused the state change (before any state code is executed).
[edit] WeaponFiring.EndState
Overrides: Object.EndState (global)
Called immediately before going out of the current state, while within the GotoState() call that caused the state change, and before BeginState() is called within the new state.
[edit] WeaponFiring.IsFiring
Overrides: IsFiring (global)
Returns true if the weapon is firing, used by AI
[edit] WeaponFiring.RefireCheckTimer
Overrides: RefireCheckTimer (global)
Timer event, call is set up in Weapon::TimeWeaponFiring(). The weapon is given a chance to evaluate if another shot should be fired. This event defines the weapon's rate of fire.
[edit] WeaponPuttingDown
Modifiers: simulated
[edit] WeaponPuttingDown.BeginState
Overrides: Object.BeginState (global)
Time the process and clear the Firing flags
[edit] WeaponPuttingDown.EndState
Overrides: Object.EndState (global)
Called immediately before going out of the current state, while within the GotoState() call that caused the state change, and before BeginState() is called within the new state.
[edit] WeaponPuttingDown.TryPutDown
Overrides: TryPutDown (global)
(Description copied from Weapon.TryPutDown)
Put Down current weapon Once the weapon is put down, the InventoryManager will switch to InvManager.PendingWeapon.
Returns:
- returns true if the weapon can be put down.
[edit] WeaponPuttingDown.WeaponIsDown
We are done putting the weapon away, remove the mesh/etc.
