Mostly Harmless

Legacy:WeaponLocker

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2004 :: Actor >> Pickup >> WeaponLocker (Package: XWeapons)

The WeaponLocker is a mutli-pickup base for weapons. Extra ammo is available for each weapon as well.

Struct

WeaponEntry

Both these properties are available for editing.

class<Weapon> WeaponClass 
The weapon class available for pickup.
int ExtraAmmo 
Amount of extra ammo for this weapon.

PawnToucher

Both these properties are hidden.

Pawn
The Pawn attempting to get the weapons.
float NextTouchTime 
The next time in Level.Seconds the Pawn can pickup weapons.

Properties

Main

bool bSentinelProtected 
Protected by an ASVehicle_Sentinel Pawn.
array<WeaponEntry> Weapons 
The weapons this lockers has available.

Hidden

string LockerString (localized) 
FX_WeaponLocker Effect 
array<PawnToucher> Customers 
The Pawn customers that have visited this WeaponLocker.

Functions

bool AddCustomer( Pawn P ) 
bool HasCustomer( Pawn P ) 
PostNetBeginPlay() (simulated) 
Calls Super.PostNetBeginPlay(). Sets MaxDesireability = 0. If bHidden, returns. Sets MaxDesireability higher for each WeaponClass.Default.AIRating is has. Calls SpawnLockerWeapon(). If Level.NetMode != NM_DedicatedServer, calls Effect = Spawn(class'FX_WeaponLocker', Self,, Location, Rotation ).
Destroyed() (simulated) 
Destroys Effect before calling Super.Destroyed().
UpdateHUD( HUD H ) (simulated, static) 
Sets H.LastPickupTime = H.Level.TimeSeconds and H.LastWeaponPickupTime = H.LastPickupTime.
Reset() 
EMPTY
SpawnLockerWeapon() (simulated) 
Spawns the Weapon Meshes from a Mesh Emitter.
string GetHumanReadableName() (simulated) 
Returns LockerString.
float BotDesireability( Pawn Bot) 
Tell the bot how much it wants this weapon pickup. Called when the bot is trying to decide which inventory pickup to go after next.
float DetourWeight( Pawn Other, float PathWeight ) 
Value of this path to take a quick detour. (usually 0, used when on route to distant objective, but want to grab inventory for example)
UpdatePrecacheMaterials() (simulated) 

States

LockerPickup (auto)

Functions

bool ReadyToPickup( float MaxWait ) 
Returns true.
bool ValidTouch( Actor Other ) (simulated) 
Validate touch (if valid return true to let other pick me up and trigger event).
Touch( Actor Other ) (simulated) 
If touched by a player pawn, let him pick this up.

Disabled

Functions

BeginState() (simulated) 
Destroys all LockerWeapon class actors. Destroys Effect.

Related Topics

Discussion

SuperApe: Created.