Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

UE2:U2Weapon (U2XMP)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
U2XMP Object >> Actor >> Inventory >> Weapon >> U2Weapon

Contents

Package: 
U2
Direct subclasses:
WeaponInvEnergyRifle, U2XMPItem, WeaponInvAssaultRifle, WeaponInvDispersion, WeaponInvFlameThrower, WeaponInvGrenadeLauncher, WeaponInvLaserRifle, WeaponInvLeechGun, WeaponInvPistol, WeaponInvRocketLauncher, WeaponInvShotgun, WeaponInvSingularityCannon, WeaponInvSniperRifle, WeaponInvTakkra, WeaponTurretMounted

U2Weapon.uc Created By: Mike Lambert Created On: 6/14/01 $Author: Mfox $ $Date: 1/29/03 1:50p $ $Revision: 157 $

Constants[edit]

MaxRapidFireRate[edit]

Value: 0.50

firing rates <= this are considered rapid fire

MinSlowFireRate[edit]

Value: 0.51


RatingFireNow[edit]

Value: 100.000

weapon wants Pawn to fire it immediately (i.e. even if no target)

RatingHighest[edit]

Value: 90.000

weapon thinks it would be highly effective if used now

RatingDefault[edit]

Value: 0.000

default

RatingLow[edit]

Value: -5.000

weapon is a poor choice but could be used if nothing better

RatingIneffective[edit]

Value: -10.000

weapon will have no effect on target in current situation

RatingDangerous[edit]

Value: -20.000

using weapon now will likely hurt/kill owner

RatingNoAmmo[edit]

Value: -30.000

not enough ammo to fire/altfire

RatingCantFire[edit]

Value: -40.000

can't actually fire weapon currently (not ready etc.)

RatingDisabled[edit]

Value: -50.000

weapon is disabled (alt and primary fire)

RatingNone[edit]

Value: -99.999

no rating (e.g. no weapon)

RangeUnlimited[edit]

Value: 32767.0


Properties[edit]

Property group 'Firing'[edit]

AltFireLastDownTime[edit]

Type: float


Default value: 1.0

AltFireLastReloadTime[edit]

Type: float


Default value: 1.0

AltFireTime[edit]

Type: float


Default value: 0.5

DownTime[edit]

Type: float


Default value: 0.533

FireLastDownTime[edit]

Type: float


Default value: 1.0

FireLastReloadTime[edit]

Type: float


Default value: 1.0

FireTime[edit]

Type: float


Default value: 0.5

ReloadTime[edit]

Type: float


Default value: 0.5

ReloadUnloadedTime[edit]

Type: float


SelectTime[edit]

Type: float


Default value: 0.6

Property group 'U2Weapon'[edit]

See U2Weapon property group U2Weapon.

Property group 'WeaponShake'[edit]

AltShakeMag[edit]

Type: float


Default value: 5.0

AltShakeTime[edit]

Type: float


Default value: 0.2

Internal variables[edit]

AltProjectileSpeed[edit]

Type: float

used for aiming particle-based "projectile" weapons

bAdjustWeaponPitchYaw[edit]

Type: bool


bAdjustWeaponRoll[edit]

Type: bool


bAdjustWeaponXY[edit]

Type: bool


bAdjustWeaponZ[edit]

Type: bool


bAltFiring[edit]

Type: bool


bCrosshairGlows[edit]

Type: bool

crosshair should glow when it is over a targetable actor

bDisableFiring[edit]

Type: bool


bDisableTick[edit]

Type: bool

performance testing: disable weapon tick overhead temporarily

bFiring[edit]

Type: bool

firing state (used to differentiate Fire()/AltFire() handling)

bGlowing[edit]

Type: bool

whether the crosshair is currently glowing

bLastRound[edit]

Type: bool


bLockLocation[edit]

Type: bool


Crosshair[edit]

Type: Object.ComponentHandle


fAdjustWeaponRate[edit]

Type: float


Default value: 0.4

FireSkinTime[edit]

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

FirstPersonMesh[edit]

Type: Mesh


GlowingAttitude[edit]

Type: Controller.EAttitude

attitude towards targetable actor (enemy/neutral/friend)

LastFullUpdateTime[edit]

Type: float


LastTriggeredAnim[edit]

Type: name


LastWaterRingTime[edit]

Type: float


LocationOffset[edit]

Type: Object.Vector


MagicKey[edit]

Type: int


ProjectileFireStartLocation[edit]

Type: Object.Vector


ProjectileSpeed[edit]

Type: float


RotationOffset[edit]

Type: Object.Rotator


TraceFireStartLocation[edit]

Type: Object.Vector


U2PCOwner[edit]

Type: U2PlayerController

set in XXXBeginPlay to avoid need to cast owner all over the place

UpdateRangeAmmoType[edit]

Type: Ammunition

for weapons using tossed projectiles (in case ammo type can vary)

UpdateRangeGravityZ[edit]

Type: float

for weapons using tossed projectiles, last Z gravity used to update ranges

UseGlowingCrosshairs[edit]

Type: bool

Modifiers: config

Allow user to disable for performance.

Default value: True

Default values[edit]

Property Value
ActorFOV 60.0
AIRating -99.999
AlignMeshTraceOffset1
Member Value
X 10.0
Y -5.0
Z -12.0
AlignMeshTraceOffset2
Member Value
X 10.0
Y 5.0
Z -12.0
AlignMeshTraceOffset3
Member Value
X -12.0
Z -12.0
bAutoEnableAgent True
bBounce True
bNoSmooth False
CollisionHeight 0.0
CollisionRadius 0.0
ShakeMag 5.0
ShakeTime 0.2
SoundRadius 800.0
TransientSoundRadius 800.0

Structs[edit]

DecoEffect[edit]

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

Functions[edit]

Static functions[edit]

AddAmmo[edit]

static function bool AddAmmo (Pawn Other, string AmmoClassString, int AddAmmoAmount, optional bool bMaximizeClipAmount)


Exec functions[edit]

AdjustWeaponLog[edit]

exec function AdjustWeaponLog ()


AdjustWeaponPitchYaw[edit]

exec function AdjustWeaponPitchYaw ()


AdjustWeaponRate[edit]

exec function AdjustWeaponRate (float f)


AdjustWeaponRoll[edit]

exec function AdjustWeaponRoll ()


AdjustWeaponXY[edit]

exec function AdjustWeaponXY ()


AdjustWeaponZ[edit]

exec function AdjustWeaponZ ()


StopAdjust[edit]

exec function StopAdjust ()


Events[edit]

AnimEnd[edit]

simulated event AnimEnd (int Channel)

Overrides: Actor.AnimEnd


Destroyed[edit]

simulated event Destroyed ()

Overrides: Weapon.Destroyed


PostBeginPlay[edit]

simulated event PostBeginPlay ()

Overrides: Weapon.PostBeginPlay


RenderOverlays[edit]

simulated event RenderOverlays (Canvas Canvas)

Overrides: Inventory.RenderOverlays


Other instance functions[edit]

See U2Weapon instance functions.

States[edit]

Active[edit]

Inherits from: Weapon.Active

Modifiers: simulated

Ignores: AltFire, Fire

Active.AnimEnd[edit]

simulated event AnimEnd (int Channel)

Overrides: AnimEnd (global)


Active.BeginState[edit]

simulated event BeginState ()

Overrides: Weapon.Active.BeginState


Active.EndState[edit]

simulated event EndState ()

Overrides: Weapon.Active.EndState


Active.PutDown[edit]

simulated function bool PutDown ()

Overrides: Weapon.Active.PutDown


AltFiring[edit]

Modifiers: simulated

Ignores: AltFire, Fire

AltFiring.BeginState[edit]

simulated event BeginState ()

Overrides: Object.BeginState (global)


AltFiring.EndState[edit]

simulated event EndState ()

Overrides: Object.EndState (global)


AltFiring.Reload[edit]

simulated function Reload ()

Overrides: Reload (global)


DownWeapon[edit]

Inherits from: Weapon.DownWeapon

Modifiers: simulated

Ignores: AltFire, Fire

DownWeapon.AnimEnd[edit]

simulated event AnimEnd (int Channel)

Overrides: AnimEnd (global)


DownWeapon.BeginState[edit]

simulated event BeginState ()

Overrides: Weapon.DownWeapon.BeginState


DownWeapon.EndState[edit]

simulated event EndState ()

Overrides: Object.EndState (global)


DownWeapon.CanFire[edit]

function bool CanFire ()

Overrides: Weapon.CanFire (global)


DownWeapon.PutDown[edit]

simulated function bool PutDown ()

Overrides: Weapon.DownWeapon.PutDown


Firing[edit]

Modifiers: simulated

Ignores: AltFire, Fire

Firing.BeginState[edit]

simulated event BeginState ()

Overrides: Object.BeginState (global)


Firing.EndState[edit]

simulated event EndState ()

Overrides: Object.EndState (global)


Firing.Reload[edit]

simulated function Reload ()

Overrides: Reload (global)


Idle[edit]

Modifiers: simulated

Idle.AnimEnd[edit]

simulated event AnimEnd (int Channel)

Overrides: AnimEnd (global)


Idle.PutDown[edit]

simulated function bool PutDown ()

Overrides: Weapon.PutDown (global)


Reloading[edit]

Modifiers: simulated

Ignores: AltFire, Fire, Reload

Reloading.BeginState[edit]

simulated event BeginState ()

Overrides: Object.BeginState (global)


Reloading.EndState[edit]

simulated event EndState ()

Overrides: Object.EndState (global)


Reloading.CanFire[edit]

function bool CanFire ()

Overrides: Weapon.CanFire (global)