Worst-case scenario: the UEd Goblin wipes the map and burns down your house.
UE3:UTInventoryManager (UT3)
Object >> Actor >> InventoryManager >> UTInventoryManager |
Contents
- 1 Properties
- 2 Structs
- 3 Functions
- 3.1 Events
- 3.2 Other instance functions
- 3.2.1 AddAmmoToWeapon
- 3.2.2 AddInventory
- 3.2.3 AdjustWeapon
- 3.2.4 AllAmmo
- 3.2.5 ChangedWeapon
- 3.2.6 CheckSwitchTo
- 3.2.7 ClientSetCurrentWeapon
- 3.2.8 ClientWeaponSet
- 3.2.9 CreateInventory
- 3.2.10 DemoSetCurrentWeapon
- 3.2.11 DisruptInventory
- 3.2.12 DrawHud
- 3.2.13 ForceDeployableSwitch
- 3.2.14 GetWeaponList
- 3.2.15 HasInventoryOfClass
- 3.2.16 NeedsAmmo
- 3.2.17 NextWeapon
- 3.2.18 PrevWeapon
- 3.2.19 ProcessRetrySwitch
- 3.2.20 RemoveFromInventory
- 3.2.21 RetrySwitchTo
- 3.2.22 ServerSetCurrentWeapon
- 3.2.23 SetCurrentWeapon
- 3.2.24 SetPendingWeapon
- 3.2.25 SwitchToBestWeapon
- 3.2.26 SwitchToPreviousWeapon
- 3.2.27 SwitchWeapon
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
UTInventoryManager UT inventory definition
Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
Properties[edit]
AmmoStorage[edit]
Stores the currently stored up ammo
bInfiniteAmmo[edit]
Type: bool
if true, all weapons use no ammo
LastAdjustWeaponTime[edit]
Type: float
last time AdjustWeapon() was called
PendingSwitchWeapon[edit]
Type: UTWeapon
weapon server is retrying switch to because the current weapon temporarily denied it (due to currently firing, etc)
PreviousWeapon[edit]
Type: Weapon
Holds the last weapon used
Default values[edit]
Property | Value |
---|---|
bMustHoldWeapon | True |
Structs[edit]
AmmoStore[edit]
Modifiers: native
This struct defines ammo that is stored in inventory, but for which the pawn doesn't yet have a weapon for.
Functions[edit]
Events[edit]
DiscardInventory[edit]
Overrides: InventoryManager.DiscardInventory
Discard full inventory, generally because the owner died
Other instance functions[edit]
AddAmmoToWeapon[edit]
Called by the UTAmmoPickup classes, this function attempts to add ammo to a weapon. If that weapon exists, it adds it otherwise it tracks the ammo in an array for later.
AddInventory[edit]
Overrides: InventoryManager.AddInventory
Handle AutoSwitching to a weapon
AdjustWeapon[edit]
AllAmmo[edit]
AllAmmo() All weapons currently in inventory have ammo increased to max allowed value. Super weapons will only have their ammo amount changed if bAmmoForSuperWeapons is true.
ChangedWeapon[edit]
Overrides: InventoryManager.ChangedWeapon
Store the last used weapon for later
CheckSwitchTo[edit]
checks if we should autoswitch to this weapon (server)
ClientSetCurrentWeapon[edit]
Accessor for the server to begin a weapon switch on the client.
Parameters:
- DesiredWeapon - The Weapon to switch to
ClientWeaponSet[edit]
Overrides: InventoryManager.ClientWeaponSet
Weapon just given to a player, check if player should switch to this weapon Network: LocalPlayer Called from Weapon.ClientWeaponSet()
CreateInventory[edit]
Overrides: InventoryManager.CreateInventory
(Description copied from InventoryManager.CreateInventory)
Spawns a new Inventory actor of NewInventoryItemClass type, and adds it to the Inventory Manager.
Parameters:
- NewInventoryItemClass - Class of inventory item to spawn and add.
Returns:
- Inventory actor, None if couldn't be spawned.
DemoSetCurrentWeapon[edit]
Routes weapon switch events to demos
DisruptInventory[edit]
DrawHud[edit]
Overrides: InventoryManager.DrawHud
(Description copied from InventoryManager.DrawHud)
Hook called from HUD actor. Gives access to HUD and Canvas
Parameters:
- H - HUD
ForceDeployableSwitch[edit]
force switch to deployable after getting out of vehicle.
(In case didn't switch for some reason before getting in vehicle)
GetWeaponList[edit]
HasInventoryOfClass[edit]
Scans the inventory looking for any of type InvClass. If it finds it it returns it, other it returns none.
NeedsAmmo[edit]
NextWeapon[edit]
Overrides: InventoryManager.NextWeapon
Switches to Next weapon Network: Client
PrevWeapon[edit]
Overrides: InventoryManager.PrevWeapon
Switches to Previous weapon Network: Client
ProcessRetrySwitch[edit]
timer function set by RetrySwitchTo() to actually retry the switch
RemoveFromInventory[edit]
Overrides: InventoryManager.RemoveFromInventory
(Description copied from InventoryManager.RemoveFromInventory)
Attempts to remove an item from the inventory list if it exists.
Parameters:
- Item - Item to remove from inventory
RetrySwitchTo[edit]
called to retry switching to the passed in weapon a little later
ServerSetCurrentWeapon[edit]
Overrides: InventoryManager.ServerSetCurrentWeapon
When a client-switch begins on a remote-client, the server needs to be told to start the process as well. SetCurrentWeapon() makes that call.
NETWORK - This function should *ONLY* be called from a remote client's SetCurrentWeapon() function.
Parameters:
- DesiredWeapon - The Weapon to switch to
SetCurrentWeapon[edit]
Overrides: InventoryManager.SetCurrentWeapon
SetCurrentWeapon starts a weapon change. It calls SetPendingWeapon and then if it's called on a remote client, tells the server to begin the process.
Parameters:
- DesiredWeapon - The Weapon to switch to
SetPendingWeapon[edit]
Overrides: InventoryManager.SetPendingWeapon
This is the work-horse of the weapon switch. It will set a new pending weapon and tell the weapon to begin the switch. If the call to Weapon.TryPutdown() returns false, it means that the weapon can't switch at the moment and has deferred it until later
Parameters:
- DesiredWeapon - The Weapon to switch to
SwitchToBestWeapon[edit]
Overrides: InventoryManager.SwitchToBestWeapon
Cut and pasted here except call ClientWeaponSet on the weapon instead of forcing it. This causes all of the "should I put down" logic to occur
SwitchToPreviousWeapon[edit]
SwitchWeapon[edit]
Handling switching to a weapon group