I'm a doctor, not a mechanic
UE3:Weapon (UDK)
Contents
- 1 Properties
- 1.1 Property group 'Weapon'
- 1.2 Internal variables
- 1.2.1 AIController
- 1.2.2 AIRating
- 1.2.3 bCanThrow
- 1.2.4 bInstantHit
- 1.2.5 bMeleeWeapon
- 1.2.6 bWasDoNotActivate
- 1.2.7 bWasOptionalSet
- 1.2.8 bWeaponPutDown
- 1.2.9 CachedMaxRange
- 1.2.10 CurrentFireMode
- 1.2.11 FiringStatesArray
- 1.2.12 InstantHitDamageTypes
- 1.2.13 Priority
- 1.2.14 ShouldFireOnRelease
- 1.2.15 WeaponFireTypes
- 1.2.16 WeaponProjectiles
- 1.3 Default values
- 2 Enums
- 3 Functions
- 4 States
- Package:
- Engine
- Direct subclass:
- GameWeapon
- This class in other games:
- RTNP, U1, UT, UE2Runtime, U2XMP, UT2004, U2, UT2003, UT3
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Base Weapon implementation.
Properties[edit]
Property group 'Weapon'[edit]
DefaultAnimSpeed[edit]
Type: float
When no duration is specified, speed to play anims.
Default value: 1.0
EquipTime[edit]
Type: float
How long does it take to Equip this weapon
Default value: 0.33
FireInterval[edit]
Holds the amount of time a single shot takes
FireOffset[edit]
Type: Object.Vector
Holds an offest for spawning protectile effects.
InstantHitDamage[edit]
How much damage does a given instanthit shot do
InstantHitMomentum[edit]
momentum transfer scaling for instant hit damage
Mesh[edit]
Type: MeshComponent
Modifiers: editinline
Weapon Mesh
PutDownTime[edit]
Type: float
How long does it take to put this weapon down
Default value: 0.33
Spread[edit]
How much of a spread between shots
WeaponRange[edit]
Type: float
Range of Weapon, used for Traces (InstantFire, ProjectileFire, AdjustAim...)
Default value: 16384.0
Internal variables[edit]
AIController[edit]
Type: AIController
Modifiers: protectedwrite
Current AI controlling this weapon
AIRating[edit]
Type: float
Default value: 0.5
bCanThrow[edit]
Type: bool
Can player toss his weapon out? Typically false for default inventory.
Default value: True
bInstantHit[edit]
Type: bool
bMeleeWeapon[edit]
Type: bool
bWasDoNotActivate[edit]
Type: bool
Set from ClientWeaponSet() when it has to go through PendingClientWeaponSet, to preserve those variables.
bWasOptionalSet[edit]
Type: bool
Set from ClientWeaponSet() when it has to go through PendingClientWeaponSet, to preserve those variables.
bWeaponPutDown[edit]
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...)
CachedMaxRange[edit]
Type: float
Cache MaxRange of weapon
CurrentFireMode[edit]
Type: byte
Current FireMode
FiringStatesArray[edit]
Array of firing states defining available firemodes
InstantHitDamageTypes[edit]
Type: array<class<DamageType> >
DamageTypes for Instant Hit Weapons
Priority[edit]
Type: float
Modifiers: databinding, config
Configurable weapon priority. Ties (mod weapons) are broken by GroupWeight
Default value: -1.0
ShouldFireOnRelease[edit]
WeaponFireTypes[edit]
Type: array<EWeaponFireType>
Defines the type of fire (see Enum above) for each mode
WeaponProjectiles[edit]
Type: array<class<Projectile> >
The Class of Projectile to spawn
Default values[edit]
Property | Value |
---|---|
bOnlyDirtyReplication | False |
bReplicateInstigator | True |
ItemName | "Weapon" |
RespawnTime | 30.0 |
Enums[edit]
EWeaponFireType[edit]
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
Functions[edit]
Static functions[edit]
PassThroughDamage[edit]
returns true if should pass trace through this hitactor
Native functions[edit]
GetPhysicalFireStartLoc[edit]
This function returns the world location for spawning the projectile, pulled in to the Pawn's collision along the AimDir direction.
Events[edit]
Destroyed[edit]
Overrides: Inventory.Destroyed
Event called when weapon actor is destroyed
GetMuzzleLoc[edit]
This function returns the world location for spawning the visual effects
GetTraceRange[edit]
Range of weapon Used for Traces (CalcWeaponFire, InstantFire, ProjectileFire, AdjustAim...) State scoped accessor function. Override in proper state
Returns:
- range of weapon, to be used mainly for traces.
IsFiring[edit]
Returns true if the weapon is firing, used by AI
Other instance functions[edit]
See Weapon instance functions.
States[edit]
Active[edit]
Modifiers: simulated
Active.BeginState[edit]
Overrides: Object.BeginState (global)
Initialize the weapon as being active and ready to go.
Active.Activate[edit]
Overrides: Activate (global)
Activate() ignored since already active
Active.BeginFire[edit]
Overrides: BeginFire (global)
Override BeginFire so that it will enter the firing state right away.
Active.ReadyToFire[edit]
ReadyToFire() called by NPC firing weapon. bFinished should only be true if called from the Finished() function
Active.TryPutDown[edit]
Overrides: TryPutDown (global)
Put the weapon down
Inactive[edit]
State Inactive Default state for a weapon. It is not active, cannot fire and resides in player inventory.
Modifiers: auto
Inactive.BeginState[edit]
Overrides: Object.BeginState (global)
Clear out the PendingFires
Inactive.ServerStartFire[edit]
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.
Inactive.ServerStopFire[edit]
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.
Inactive.StartFire[edit]
Overrides: StartFire (global)
do not allow firing in the inactive state
Inactive.TryPutDown[edit]
Overrides: TryPutDown (global)
can't put down an inactive weapon
PendingClientWeaponSet[edit]
State PendingClientWeaponSet A weapon sets in this state on a remote client while it awaits full replication of all properties.
PendingClientWeaponSet.BeginState[edit]
Overrides: Object.BeginState (global)
Event called when weapon enters this state
PendingClientWeaponSet.EndState[edit]
Overrides: Object.EndState (global)
Event called when weapon leaves this state
PendingClientWeaponSet.PendingWeaponSetTimer[edit]
WeaponEquipping[edit]
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
WeaponEquipping.BeginState[edit]
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).
WeaponEquipping.EndState[edit]
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.
WeaponEquipping.Activate[edit]
Overrides: Activate (global)
Activate() ignored since already becoming active
WeaponEquipping.WeaponEquipped[edit]
WeaponFiring[edit]
Modifiers: simulated
WeaponFiring.BeginState[edit]
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).
WeaponFiring.EndState[edit]
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.
WeaponFiring.IsFiring[edit]
Overrides: IsFiring (global)
Returns true if the weapon is firing, used by AI
WeaponFiring.RefireCheckTimer[edit]
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.
WeaponPuttingDown[edit]
Modifiers: simulated
WeaponPuttingDown.BeginState[edit]
Overrides: Object.BeginState (global)
Time the process and clear the Firing flags
WeaponPuttingDown.EndState[edit]
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.
WeaponPuttingDown.ClientWeaponThrown[edit]
Overrides: ClientWeaponThrown (global)
This function is called when the client needs to discard the weapon
WeaponPuttingDown.TryPutDown[edit]
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.
WeaponPuttingDown.WeaponIsDown[edit]
Overrides: WeaponIsDown (global)
We are done putting the weapon away, remove the mesh/etc.