I'm a doctor, not a mechanic
UE2:U2Weapon (U2XMP)
From Unreal Wiki, The Unreal Engine Documentation Site
- Package:
- U2
- Direct subclasses:
- U2XMPItem, WeaponInvAssaultRifle, WeaponInvDispersion, WeaponInvEnergyRifle, WeaponInvFlameThrower, WeaponInvGrenadeLauncher, WeaponInvLaserRifle, WeaponInvLeechGun, WeaponInvPistol, WeaponInvRocketLauncher, WeaponInvShotgun, WeaponInvSingularityCannon, WeaponInvSniperRifle, WeaponInvTakkra, WeaponTurretMounted
| 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. |
U2Weapon.uc Created By: Mike Lambert Created On: 6/14/01 $Author: Mfox $ $Date: 1/29/03 1:50p $ $Revision: 157 $
[edit] Constants
[edit] MaxRapidFireRate
Value: 0.50
firing rates <= this are considered rapid fire
[edit] MinSlowFireRate
Value: 0.51
[edit] RatingFireNow
Value: 100.000
weapon wants Pawn to fire it immediately (i.e. even if no target)
[edit] RatingHighest
Value: 90.000
weapon thinks it would be highly effective if used now
[edit] RatingDefault
Value: 0.000
default
[edit] RatingLow
Value: -5.000
weapon is a poor choice but could be used if nothing better
[edit] RatingIneffective
Value: -10.000
weapon will have no effect on target in current situation
[edit] RatingDangerous
Value: -20.000
using weapon now will likely hurt/kill owner
[edit] RatingNoAmmo
Value: -30.000
not enough ammo to fire/altfire
[edit] RatingCantFire
Value: -40.000
can't actually fire weapon currently (not ready etc.)
[edit] RatingDisabled
Value: -50.000
weapon is disabled (alt and primary fire)
[edit] RatingNone
Value: -99.999
no rating (e.g. no weapon)
[edit] RangeUnlimited
Value: 32767.0
[edit] Properties
[edit] Property group 'Firing'
[edit] AltFireLastDownTime
Type: float
Default value: 1.0
[edit] AltFireLastReloadTime
Type: float
Default value: 1.0
[edit] AltFireTime
Type: float
Default value: 0.5
[edit] DownTime
Type: float
Default value: 0.533
[edit] FireLastDownTime
Type: float
Default value: 1.0
[edit] FireLastReloadTime
Type: float
Default value: 1.0
[edit] FireTime
Type: float
Default value: 0.5
[edit] ReloadTime
Type: float
Default value: 0.5
[edit] ReloadUnloadedTime
Type: float
[edit] SelectTime
Type: float
Default value: 0.6
[edit] Property group 'U2Weapon'
See U2Weapon property group U2Weapon.
[edit] Property group 'WeaponShake'
[edit] AltShakeMag
Type: float
Default value: 5.0
[edit] AltShakeTime
Type: float
Default value: 0.2
[edit] Internal variables
[edit] AltProjectileSpeed
Type: float
used for aiming particle-based "projectile" weapons
[edit] bAdjustWeaponPitchYaw
Type: bool
[edit] bAdjustWeaponRoll
Type: bool
[edit] bAdjustWeaponXY
Type: bool
[edit] bAdjustWeaponZ
Type: bool
[edit] bAltFiring
Type: bool
[edit] bCrosshairGlows
Type: bool
crosshair should glow when it is over a targetable actor
[edit] bDisableFiring
Type: bool
[edit] bDisableTick
Type: bool
performance testing: disable weapon tick overhead temporarily
[edit] bFiring
Type: bool
firing state (used to differentiate Fire()/AltFire() handling)
[edit] bGlowing
Type: bool
whether the crosshair is currently glowing
[edit] bLastRound
Type: bool
[edit] bLockLocation
Type: bool
[edit] Crosshair
Type: Object.ComponentHandle
[edit] fAdjustWeaponRate
Type: float
Default value: 0.4
[edit] FireSkinTime
Type: float
Time we set the fireskin, so we can turn it off in the next tick (using a timer caused it to be turned off before we even saw it ;)
Default value: 1.0E9
[edit] FirstPersonMesh
Type: Mesh
[edit] GlowingAttitude
Type: Controller.EAttitude
attitude towards targetable actor (enemy/neutral/friend)
[edit] LastFullUpdateTime
Type: float
[edit] LastTriggeredAnim
Type: name
[edit] LastWaterRingTime
Type: float
[edit] LocationOffset
Type: Object.Vector
[edit] MagicKey
Type: int
[edit] ProjectileFireStartLocation
Type: Object.Vector
[edit] ProjectileSpeed
Type: float
[edit] RotationOffset
Type: Object.Rotator
[edit] TraceFireStartLocation
Type: Object.Vector
[edit] U2PCOwner
Type: U2PlayerController
set in XXXBeginPlay to avoid need to cast owner all over the place
[edit] UpdateRangeAmmoType
Type: Ammunition
for weapons using tossed projectiles (in case ammo type can vary)
[edit] UpdateRangeGravityZ
Type: float
for weapons using tossed projectiles, last Z gravity used to update ranges
[edit] UseGlowingCrosshairs
Type: bool
Modifiers: config
Allow user to disable for performance.
Default value: True
[edit] Default values
| Property | Value | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| ActorFOV | 60.0 | ||||||||
| AIRating | -99.999 | ||||||||
| AlignMeshTraceOffset1 |
|
||||||||
| AlignMeshTraceOffset2 |
|
||||||||
| AlignMeshTraceOffset3 |
|
||||||||
| bAutoEnableAgent | True | ||||||||
| bBounce | True | ||||||||
| bNoSmooth | False | ||||||||
| CollisionHeight | 0.0 | ||||||||
| CollisionRadius | 0.0 | ||||||||
| ShakeMag | 5.0 | ||||||||
| ShakeTime | 0.2 | ||||||||
| SoundRadius | 800.0 | ||||||||
| TransientSoundRadius | 800.0 |
[edit] Structs
[edit] DecoEffect
Modifiers: native
- name AnimSequence
- name of the associated animation that this effect should be triggered on
- class<Actor> DecoClass
- name of the class to spawn
- ParticleGenerator Particles
- name of the package.object to load the particle system from (optional)
- string MountNode
- name of the bone to attach to (can be left blank for attaching relative to the weapon's origin)
- Object.Vector MountOffset
- translation offset from mount location
- Object.Rotator MountRot
- rotation offset from mount orientation
- Object.Vector ThirdPersonOffset
- translation offset from weapon hand location in 3rd person (since those use staticmeshes, not golem meshes)
- bool GameplayRelevant
- effect has an effect on gameplay, such as damaging particles (will be placed at head offset)
- bool bTriggerUpdateOnly
- only update location when triggered (for effects that need to be left behind)
- bool bWorldFOV
- draw in world fov (as opposed to weapon fov)
- bool bRequiresWorldZBuffer
- if false and in a 1st-person weapon, draws after the z-buffer has been cleared and the weapon has been drawn. otherwise, draws into the world zbuffer
- bool AutoAim
- aim particle as though it was a projectile spawned via ProjectileFire.
- int AIAim
- if set, auto-aim effect for NPCs (value should be set to the speed of the projectile we're aiming -- for leading).
- float PushBack
- push the effect back up to this number of units if we're too close to anything (not evaluated for TriggerUpdateOnly effects).
- Actor Effect
- instance of above described effect
[edit] Functions
[edit] Static functions
[edit] AddAmmo
[edit] Exec functions
[edit] AdjustWeaponLog
[edit] AdjustWeaponPitchYaw
[edit] AdjustWeaponRate
[edit] AdjustWeaponRoll
[edit] AdjustWeaponXY
[edit] AdjustWeaponZ
[edit] StopAdjust
[edit] Events
[edit] AnimEnd
Overrides: Actor.AnimEnd
[edit] Destroyed
Overrides: Weapon.Destroyed
[edit] PostBeginPlay
Overrides: Weapon.PostBeginPlay
[edit] RenderOverlays
Overrides: Inventory.RenderOverlays
[edit] Other instance functions
See U2Weapon instance functions.
[edit] States
[edit] Active
Inherits from: Weapon.Active
Modifiers: simulated
[edit] Active.AnimEnd
Overrides: AnimEnd (global)
[edit] Active.BeginState
Overrides: Weapon.Active.BeginState
[edit] Active.EndState
Overrides: Weapon.Active.EndState
[edit] Active.PutDown
Overrides: Weapon.Active.PutDown
[edit] AltFiring
Modifiers: simulated
[edit] AltFiring.BeginState
Overrides: Object.BeginState (global)
[edit] AltFiring.EndState
Overrides: Object.EndState (global)
[edit] AltFiring.Reload
Overrides: Reload (global)
[edit] DownWeapon
Inherits from: Weapon.DownWeapon
Modifiers: simulated
[edit] DownWeapon.AnimEnd
Overrides: AnimEnd (global)
[edit] DownWeapon.BeginState
Overrides: Weapon.DownWeapon.BeginState
[edit] DownWeapon.EndState
Overrides: Object.EndState (global)
[edit] DownWeapon.CanFire
Overrides: Weapon.CanFire (global)
[edit] DownWeapon.PutDown
Overrides: Weapon.DownWeapon.PutDown
[edit] Firing
Modifiers: simulated
[edit] Firing.BeginState
Overrides: Object.BeginState (global)
[edit] Firing.EndState
Overrides: Object.EndState (global)
[edit] Firing.Reload
Overrides: Reload (global)
[edit] Idle
Modifiers: simulated
[edit] Idle.AnimEnd
Overrides: AnimEnd (global)
[edit] Idle.PutDown
Overrides: Weapon.PutDown (global)
[edit] Reloading
Modifiers: simulated
Ignores: AltFire, Fire, Reload
[edit] Reloading.BeginState
Overrides: Object.BeginState (global)
[edit] Reloading.EndState
Overrides: Object.EndState (global)
[edit] Reloading.CanFire
Overrides: Weapon.CanFire (global)
