Mostly Harmless
UE3:UTInventoryManager (UT3)
From Unreal Wiki, The Unreal Engine Documentation Site
| Object >> Actor >> InventoryManager >> UTInventoryManager |
| This is an auto-generated page and may need human attention. Please remove this 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.
[edit] Properties
[edit] AmmoStorage
Stores the currently stored up ammo
[edit] bInfiniteAmmo
Type: bool
if true, all weapons use no ammo
[edit] LastAdjustWeaponTime
Type: float
last time AdjustWeapon() was called
[edit] PendingSwitchWeapon
Type: UTWeapon
weapon server is retrying switch to because the current weapon temporarily denied it (due to currently firing, etc)
[edit] PreviousWeapon
Type: Weapon
Holds the last weapon used
[edit] Default values
| Property | Value |
|---|---|
| bMustHoldWeapon | True |
[edit] Structs
[edit] AmmoStore
Modifiers: native
This struct defines ammo that is stored in inventory, but for which the pawn doesn't yet have a weapon for.
[edit] Functions
[edit] Events
[edit] DiscardInventory
Overrides: InventoryManager.DiscardInventory
Discard full inventory, generally because the owner died
[edit] Other instance functions
[edit] AddAmmoToWeapon
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.
[edit] AddInventory
Overrides: InventoryManager.AddInventory
Handle AutoSwitching to a weapon
[edit] AdjustWeapon
[edit] AllAmmo
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.
[edit] ChangedWeapon
Overrides: InventoryManager.ChangedWeapon
Store the last used weapon for later
[edit] CheckSwitchTo
checks if we should autoswitch to this weapon (server)
[edit] ClientSetCurrentWeapon
Accessor for the server to begin a weapon switch on the client.
Parameters:
- DesiredWeapon - The Weapon to switch to
[edit] ClientWeaponSet
Overrides: InventoryManager.ClientWeaponSet
Weapon just given to a player, check if player should switch to this weapon Network: LocalPlayer Called from Weapon.ClientWeaponSet()
[edit] CreateInventory
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.
[edit] DemoSetCurrentWeapon
Routes weapon switch events to demos
[edit] DisruptInventory
[edit] DrawHud
Overrides: InventoryManager.DrawHud
(Description copied from InventoryManager.DrawHud)
Hook called from HUD actor. Gives access to HUD and Canvas
Parameters:
- H - HUD
[edit] ForceDeployableSwitch
force switch to deployable after getting out of vehicle.
(In case didn't switch for some reason before getting in vehicle)
[edit] GetWeaponList
[edit] HasInventoryOfClass
Scans the inventory looking for any of type InvClass. If it finds it it returns it, other it returns none.
[edit] NeedsAmmo
[edit] NextWeapon
Overrides: InventoryManager.NextWeapon
Switches to Next weapon Network: Client
[edit] PrevWeapon
Overrides: InventoryManager.PrevWeapon
Switches to Previous weapon Network: Client
[edit] ProcessRetrySwitch
timer function set by RetrySwitchTo() to actually retry the switch
[edit] RemoveFromInventory
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
[edit] RetrySwitchTo
called to retry switching to the passed in weapon a little later
[edit] ServerSetCurrentWeapon
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
[edit] SetCurrentWeapon
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
[edit] SetPendingWeapon
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
[edit] SwitchToBestWeapon
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
[edit] SwitchToPreviousWeapon
[edit] SwitchWeapon
Handling switching to a weapon group
