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

UE2:Weapon internal variables (U2)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
U2 Object >> Actor >> Inventory >> Weapon (internal variables)
Weapon internal variables in other games:
U2XMP, UE2Runtime
Other member categories for this class:
instance functions

Internal variables[edit]

AdjustedAim[edit]

Type: Object.Rotator


Affector[edit]

Type: Powerups

powerup chain currently affecting this weapon

AimError[edit]

Type: float

Aim Error for bots (note this value doubled if instant hit weapon)

Default value: 550.0

AIRating[edit]

Type: float


Default value: 0.5

AmmoAmount[edit]

Type: int

Array size: 2 (NUM_AMMO_TYPES)

Modifiers: travel

Amount of Ammo current available

AmmoFlags[edit]

Type: TAmmoFlags

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0:

Member Value
bRepeatFire True

Default value, index 1:

Member Value
bRepeatFire True

AmmoIndex[edit]

Type: int

Modifiers: travel


AmmoUsed[edit]

Type: int

Array size: 2 (NUM_AMMO_TYPES)

ammo consumed per shot

Default value, index 0: 1

Default value, index 1: 1

AnimFire[edit]

Type: name

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 'Fire'

Default value, index 1: 'AltFire'

AnimFireEnd[edit]

Type: name

Array size: 2 (NUM_AMMO_TYPES)


AnimFireLastDown[edit]

Type: name

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 'FireLastDown'

Default value, index 1: 'AltFireLastDown'

AnimFireLastReload[edit]

Type: name

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 'FireLastReload'

Default value, index 1: 'AltFireLastReload'

AnimFireLastRound[edit]

Type: name

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 'FireLastRound'

Default value, index 1: 'AltFireLastRound'

AutoSwitchPriority[edit]

Type: int


Default value: 1

bCanThrow[edit]

Type: bool

if true, player can toss this weapon out

bChangeWeapon[edit]

Type: bool

Used in Active State

bClearZ[edit]

Type: bool

Modifiers: globalconfig


Default value: True

bDrawWeapon[edit]

Type: bool

Modifiers: globalconfig


Default value: True

bForceAltFire[edit]

Type: bool


bForceFire[edit]

Type: bool


bGlowing[edit]

Type: bool

Whether the crosshair is currently glowing.

bLastRound[edit]

Type: bool

just fired last round of current clip

bMeleeWeapon[edit]

Type: bool

Weapon is only a melee weapon

bPendingAltFire[edit]

Type: bool


bPendingFire[edit]

Type: bool


bPendingReload[edit]

Type: bool


bPointing[edit]

Type: bool

Indicates weapon is being pointed

bSniping[edit]

Type: bool

weapon useful for sniping

bSteadyToggle[edit]

Type: bool


bUpdateCrosshair[edit]

Type: bool

Modifiers: globalconfig


Default value: True

bUpdateLocation[edit]

Type: bool


Default value: True

bWeaponUp[edit]

Type: bool

Used in Active State

ClipRoundsRemaining[edit]

Type: int

Array size: 2 (NUM_AMMO_TYPES)

Modifiers: travel


ClipSize[edit]

Type: int

Array size: 2 (NUM_AMMO_TYPES)

automatically initialized based on AmmoAmount

Crosshair[edit]

Type: string

UI event to send when switching to the weapon to show the crosshair.

CurrentRating[edit]

Type: float


Default value: 0.5

Damage[edit]

Type: int

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 10

Default value, index 1: 10

DisplayFOV[edit]

Type: float


Default value: 60.0

EquipResidue[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


FireEndSound[edit]

Type: Sound

Array size: 2 (NUM_AMMO_TYPES)


FireLastDownTime[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 1.0

Default value, index 1: 1.0

FireLastReloadTime[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 1.0

Default value, index 1: 1.0

FireLastRoundSound[edit]

Type: Sound

Array size: 2 (NUM_AMMO_TYPES)

played for both FireLastReload (followed by ReloadUnloaded), and FireLastDown.

FireLastRoundTime[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 1.0

Default value, index 1: 1.0

FireOffset[edit]

Type: Object.Vector

Offset from first person eye position for projectile/trace start

FirePitch[edit]

Type: Object.Range

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0:

Member Value
A 1.0
B 1.0

Default value, index 1:

Member Value
A 1.0
B 1.0

FireSkinTime[edit]

Type: float


FireSound[edit]

Type: Sound

Array size: 2 (NUM_AMMO_TYPES)


FireTime[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 0.5

Default value, index 1: 0.5

FireTimer[edit]

Type: float


LastAnim[edit]

Type: name


LastTargetName[edit]

Type: string

Last viewed target name (for TargetID).

MaxAmmo[edit]

Type: int

Array size: 2 (NUM_AMMO_TYPES)

Modifiers: travel

Max amount of ammo

MaxAutoAimRange[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 5000.0

Default value, index 1: 5000.0

MaxRange[edit]

Type: float

max range of weapon for non-trace hit attacks

Default value: 8000.0

MomentumTransfer[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 10000.0

Default value, index 1: 10000.0

MyDamageType[edit]

Type: class<DamageType>

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: Class'Engine.DamageType'

Default value, index 1: Class'Engine.DamageType'

NameColor[edit]

Type: Object.Color

used when drawing name on HUD

Default value:

Member Value
A 255
B 255
G 255
R 255

OldSkins[edit]

Type: array<Material>


OldWeapon[edit]

Type: Weapon


PickupAmmo[edit]

Type: int

Array size: 2 (NUM_AMMO_TYPES)

Modifiers: travel

Amount of Ammo to give when this is picked up for the first time

PickupAmmoCount[edit]

Type: int

Amount of ammo initially in pick-up item.

ProjectileClass[edit]

Type: class<Projectile>

Array size: 2 (NUM_AMMO_TYPES)


ProjectileFireStartLocation[edit]

Type: Object.Vector


RefireRate[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


ShakeMag[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 5.0

Default value, index 1: 5.0

ShakeTime[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 0.2

Default value, index 1: 0.2

StopFiringTime[edit]

Type: float

repeater weapons use this

TempTimer[edit]

Type: float

!!tbd

TraceAccuracy[edit]

Type: float


TraceDist[edit]

Type: float

how far instant hit trace fires go

Default value: 10000.0

TraceFireStartLocation[edit]

Type: Object.Vector


TraceSpread[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


WarnTargetPct[edit]

Type: float

Array size: 2 (NUM_AMMO_TYPES)


Default value, index 0: 0.5

Default value, index 1: 0.5

WeaponDescription[edit]

Type: string

Modifiers: localized