My program doesn't have bugs. It just develops random features.
UE3:InventoryManager instance functions (UDK)
Object >> Actor >> InventoryManager (instance functions) |
Contents
- 1 Instance functions
- 1.1 AddInventory
- 1.2 CancelWeaponChange
- 1.3 ChangedWeapon
- 1.4 ClearAllPendingFire
- 1.5 ClearPendingFire
- 1.6 ClientSyncWeapon
- 1.7 ClientWeaponSet
- 1.8 CreateInventory
- 1.9 DrawHud
- 1.10 GetBestWeapon
- 1.11 GetPendingFireLength
- 1.12 GetWeaponRatingFor
- 1.13 HandlePickupQuery
- 1.14 InternalSetCurrentWeapon
- 1.15 IsActiveWeapon
- 1.16 IsPendingFire
- 1.17 ModifyDamage
- 1.18 NextWeapon
- 1.19 OwnerDied
- 1.20 OwnerEvent
- 1.21 PrevWeapon
- 1.22 RemoveClassFromInventory
- 1.23 RemoveFromInventory
- 1.24 ServerSetCurrentWeapon
- 1.25 SetCurrentWeapon
- 1.26 SetPendingFire
- 1.27 SetPendingWeapon
- 1.28 SetupFor
- 1.29 StartFire
- 1.30 StopFire
- 1.31 SwitchToBestWeapon
- 1.32 UpdateController
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. |
Instance functions[edit]
AddInventory[edit]
Adds an existing inventory item to the list. Returns true to indicate it was added, false if it was already in the list.
Parameters:
- NewItem - Item to add to inventory manager.
Returns:
- true if item was added, false otherwise.
CancelWeaponChange[edit]
Prevents player from being without a weapon.
ChangedWeapon[edit]
ChangedWeapon is called when the current weapon is finished being deactivated
ClearAllPendingFire[edit]
ClearPendingFire[edit]
ClientSyncWeapon[edit]
If the server detects that the client's weapon is out of sync, it will use this function to realign them. Network: LocalPlayer
Parameters:
- NewWeapon - The weapon the server wishes to force the client to
ClientWeaponSet[edit]
Weapon just given to a player, check if player should switch to this weapon Network: LocalPlayer Called from Weapon.ClientWeaponSet()
CreateInventory[edit]
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.
DrawHud[edit]
Hook called from HUD actor. Gives access to HUD and Canvas
Parameters:
- H - HUD
GetBestWeapon[edit]
returns the best weapon for this Pawn in loadout
GetPendingFireLength[edit]
GetWeaponRatingFor[edit]
Returns a weight reflecting the desire to use the given weapon, used for AI and player best weapon selection.
Parameters:
- Weapon - W
Returns:
- Weapon rating (range -1.f to 1.f)
HandlePickupQuery[edit]
Handle Pickup. Can Pawn pickup this item?
Parameters:
- ItemClass - Class of Inventory our Owner is trying to pick up
- Pickup - the Actor containing that item (this may be a PickupFactory or it may be a DroppedPickup)
Returns:
- whether or not the Pickup actor should give its item to Other
InternalSetCurrentWeapon[edit]
IsActiveWeapon[edit]
returns true if ThisWeapon is the Pawn's active weapon.
Parameters:
- ThisWeapon - weapon to test if it's the Pawn's active weapon.
Returns:
- true if ThisWeapon is the Pawn's current weapon
IsPendingFire[edit]
ModifyDamage[edit]
Damage modifier. Is Pawn carrying items that can modify taken damage? Called from GameInfo.ReduceDamage()
NextWeapon[edit]
Switches to Next weapon Network: Client
OwnerDied[edit]
called when our owner is killed
OwnerEvent[edit]
Used to inform inventory when owner event occurs (for example jumping or weapon change)
Parameters:
- EventName - Name of event to forward to inventory items.
PrevWeapon[edit]
Switches to Previous weapon Network: Client
RemoveClassFromInventory[edit]
Util to completely remove items of a particular class from inventory
RemoveFromInventory[edit]
Attempts to remove an item from the inventory list if it exists.
Parameters:
- Item - Item to remove from inventory
ServerSetCurrentWeapon[edit]
ServerSetCurrentWeapon 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[edit]
Set DesiredWeapon as Current (Active) Weapon. Network: LocalPlayer
Parameters:
- DesiredWeapon - Desired weapon to assign to player
SetPendingFire[edit]
SetPendingWeapon[edit]
Set the pending weapon for switching. This shouldn't be called outside of SetCurrentWeapon()
SetupFor[edit]
Setup Inventory for Pawn P. Override this to change inventory assignment (from a pawn to another) Network: Server only
StartFire[edit]
Pawn desires to fire. By default it fires the Active Weapon if it exists. Called from PlayerController::StartFire() -> Pawn::StartFire() Network: Local Player
Parameters:
- FireModeNum - Fire mode number.
StopFire[edit]
Pawn 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
Parameters:
- FireModeNum - Fire mode number.
SwitchToBestWeapon[edit]
Switch to best weapon available in loadout Network: LocalPlayer