| Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
| previous class next class | frames no frames | |||||
Core.Object | +-- Engine.Actor | +-- Engine.InventoryManager
UTInventoryManager
| Constants Summary |
|---|
| Inherited Contants from Core.Object |
|---|
| DegToRad, INDEX_NONE, MaxInt, Pi, RadToDeg |
| Variables Summary | |
|---|---|
| bool | bMustHoldWeapon |
| Inventory | InventoryChain |
| Weapon | LastAttemptedSwitchToWeapon |
| Array<int> | PendingFire |
| Weapon | PendingWeapon |
| Inherited Variables from Core.Object |
|---|
| Class, HashNext, HashOuterNext, Linker, LinkerIndex, Name, NetIndex, ObjectArchetype, ObjectFlags, ObjectInternalInteger, Outer, StateFrame, VfTableObject |
| Enumerations Summary |
|---|
| Inherited Enumerations from Engine.Actor |
|---|
| ECollisionType, EDoubleClickDir, EMoveDir, ENetRole, EPhysics, ETravelType |
| Inherited Enumerations from Core.Object |
|---|
| EAxis, EInputEvent, EInterpCurveMode, EInterpMethodType, ETickingGroup |
| Structures Summary |
|---|
| Inherited Structures from Engine.Actor |
|---|
| AnimSlotDesc, AnimSlotInfo, AsyncLineCheckResult, CollisionImpactData, ImpactInfo, NavReference, ReplicatedHitImpulse, RigidBodyContactInfo, RigidBodyState, TimerData, TraceHitInfo |
| Functions Summary | ||
|---|---|---|
![]() | bool | AddInventory (Inventory NewItem, optional bool bDoNotActivate)) |
![]() | bool | CancelWeaponChange ())) |
![]() | ChangedWeapon ())) | |
![]() | ClientSyncWeapon (Weapon NewWeapon)) | |
![]() | ClientWeaponSet (Weapon NewWeapon, bool bOptionalSet)) | |
![]() | Inventory | CreateInventory (class<Inventory> NewInventoryItemClass, optional bool bDoNotActivate)) |
![]() | Destroyed ())) | |
![]() | DiscardInventory ())) | |
![]() | DrawHud (HUD H )) | |
![]() | DumpWeaponStats ())) | |
![]() | Inventory | FindInventoryType (class<Inventory> DesiredClass, optional bool bAllowSubclass)) |
![]() | Weapon | GetBestWeapon (optional bool bForceADifferentWeapon )) |
![]() | float | GetWeaponRatingFor (Weapon W )) |
![]() | bool | HandlePickupQuery (class<Inventory> ItemClass, Actor Pickup)) |
![]() | InventoryActors (class<Inventory> BaseClass, out Inventory Inv) | |
![]() | bool | IsActiveWeapon (Weapon ThisWeapon )) |
![]() | int | ModifyDamage (int Damage, Controller instigatedBy, vector HitLocation, vector Momentum, class |
![]() | NextWeapon ())) | |
![]() | OwnerEvent (name EventName)) | |
![]() | PostBeginPlay ())) | |
![]() | PrevWeapon ())) | |
![]() | RemoveFromInventory (Inventory ItemToRemove)) | |
![]() | ServerSetCurrentWeapon (Weapon DesiredWeapon)) | |
![]() | SetCurrentWeapon (Weapon DesiredWeapon)) | |
![]() | SetPendingWeapon (Weapon DesiredWeapon)) | |
![]() | SetupFor (Pawn P)) | |
![]() | StartFire (byte FireModeNum)) | |
![]() | StopFire (byte FireModeNum )) | |
![]() | SwitchToBestWeapon (optional bool bForceADifferentWeapon )) | |
| Variables Detail |
|---|
if true, don't allow player to put down weapon without switching to another one
First inventory item in inventory linked list
Holds the current "Fire" status for both firing modes
Player will switch to PendingWeapon, once the current weapon has been put down. @fixme laurent -- PendingWeapon should be made protected, because too many bugs result by setting this variable directly. It's only safe to read it, but to change it, SetCurrentWeapon() should be used.
| Functions Detail |
|---|
AddInventory Source codeAdds an existing inventory item to the list. Returns true to indicate it was added, false if it was already in the list.
@param NewItem Item to add to inventory manager.
@return true if item was added, false otherwise.
CancelWeaponChange Source codePrevents player from being without a weapon.
ChangedWeapon Source codeChangedWeapon is called when the current weapon is finished being deactivated
ClientSyncWeapon Source codeIf the server detects that the client's weapon is out of sync, it will use this function to realign them. Network: LocalPlayer @Param NewWeapon The weapon the server wishes to force the client to
ClientWeaponSet Source codeWeapon just given to a player, check if player should switch to this weapon Network: LocalPlayer Called from Weapon.ClientWeaponSet()
CreateInventory Source codeSpawns a new Inventory actor of NewInventoryItemClass type, and adds it to the Inventory Manager.
@param NewInventoryItemClass Class of inventory item to spawn and add.
@return Inventory actor, None if couldn't be spawned.
Destroyed Source codeEvent called when inventory manager is destroyed, called from Pawn.Destroyed()
DiscardInventory Source codeDiscard full inventory, generally because the owner died
DrawHud Source codeHook called from HUD actor. Gives access to HUD and Canvas
@param H HUD
DumpWeaponStats Source codeDump debug stats in log of all weapons in inventory.
FindInventoryType Source codereturns the inventory item of the requested class if it exists in this inventory manager.
@param DesiredClass class of inventory item we're trying to find.
@param bAllowSubclass whether subclasses of the desired class are acceptable
@return Inventory actor if found, None otherwise.
GetBestWeapon Source codereturns the best weapon for this Pawn in loadout
GetWeaponRatingFor Source codeReturns a weight reflecting the desire to use the given weapon, used for AI and player best weapon selection.
@param Weapon W
@return Weapon rating (range -1.f to 1.f)
HandlePickupQuery Source codeHandle Pickup. Can Pawn pickup this item?
@param ItemClass Class of Inventory our Owner is trying to pick up
@param Pickup the Actor containing that item (this may be a PickupFactory or it may be a DroppedPickup)
@return whether or not the Pickup actor should give its item to Other
InventoryActors Source codereturns all Inventory Actors of class BaseClass
@param BaseClass Inventory actors returned are of, or childs of, this base class.
@output Inv Inventory actors returned.
@note this iterator bails if it encounters more than 100 items, since temporary loops in linked list may sometimes be created on network clients while link pointers are being replicated. For performance reasons you shouldn't have that many inventory items anyway.
IsActiveWeapon Source codereturns true if ThisWeapon is the Pawn's active weapon.
@param ThisWeapon weapon to test if it's the Pawn's active weapon.
@return true if ThisWeapon is the Pawn's current weapon
ModifyDamage Source codeDamage modifier. Is Pawn carrying items that can modify taken damage? Called from GameInfo.ReduceDamage()
NextWeapon Source codeSwitches to Next weapon Network: Client
OwnerEvent Source codeUsed to inform inventory when owner event occurs (for example jumping or weapon change)
@param EventName Name of event to forward to inventory items.
PostBeginPlay Source code
PrevWeapon Source codeSwitches to Previous weapon Network: Client
RemoveFromInventory Source codeAttempts to remove an item from the inventory list if it exists.
@param Item Item to remove from inventory
ServerSetCurrentWeapon Source codeServerSetCurrentWeapon begins the Putdown sequence on the server. This function makes the assumption that if TryPutDown succeeded on the client, it will succeed on the server. This function shouldn't be called from anywhere except SetCurrentWeapon Network: Dedicated Server
SetCurrentWeapon Source codeSet DesiredWeapon as Current (Active) Weapon. Network: LocalPlayer
@param DesiredWeapon, Desired weapon to assign to player
SetPendingWeapon Source codeSet the pending weapon for switching. This shouldn't be called outside of SetCurrentWeapon()
SetupFor Source codeSetup Inventory for Pawn P. Override this to change inventory assignment (from a pawn to another) Network: Server only
StartFire Source codePawn desires to fire. By default it fires the Active Weapon if it exists. Called from PlayerController::StartFire() -> Pawn::StartFire() Network: Local Player
@param FireModeNum Fire mode number.
StopFire Source codePawn stops firing. i.e. player releases fire button, this may not stop weapon firing right away. (for example press button once for a burst fire) Network: Local Player
@param FireModeNum Fire mode number.
SwitchToBestWeapon Source codeSwitch to best weapon available in loadout Network: LocalPlayer
| Defaultproperties |
|---|
defaultproperties
{
RemoteRole=ROLE_SimulatedProxy
TickGroup=TG_DuringAsyncWork
bHidden=True
bOnlyRelevantToOwner=True
bReplicateInstigator=True
bReplicateMovement=False
bOnlyDirtyReplication=True
NetPriority=1.400000
CollisionType=COLLIDE_CustomDefault
Name="Default__InventoryManager"
ObjectArchetype=Actor'Engine.Default__Actor'
}
|
| Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
| previous class next class | frames no frames | |||||