This class gives access to all the player specific things like inventory Checkout Game for ways to get access to the player object.
More...
|
void | SetInventorySize (Context instigator, int count) |
| Set the amount of slots in the player's inventory.
|
|
int | GetInventorySize () |
| Get the player's current inventory slot count.
|
|
bool | PlayerHasItem (InventoryLibraryReference reference) |
| Check to see if player's inventory contains an instance of an item type.
|
|
bool | ConsumeItem (Context instigator, InventoryLibraryReference reference) |
| Try to consume an item based on an item type. Successfully consumed items remove one from the stack count or are destroyed if not stacked.
|
|
bool | AttemptGiveItem (Context instigator, InventoryLibraryReference itemToGrant, bool lockItem) |
| Attempt to give player an item.
|
|
int | GetPlayerSlot () |
| Get the the player slot (runtime identifier) associated with this player.
|
|
string | GetPlayerName () |
| Gets the player's user name! This is unreliable immediately after spawning the character, as it may take some time to populate.
|
|
This class gives access to all the player specific things like inventory Checkout Game for ways to get access to the player object.
◆ AttemptGiveItem()
bool AttemptGiveItem |
( |
Context | instigator, |
|
|
InventoryLibraryReference | itemToGrant, |
|
|
bool | lockItem ) |
Attempt to give player an item.
- Parameters
-
instigator | The source context triggering this change |
itemToGrant | The InventoryLibraryReference of the item type to give |
lockItem | Lock this item into the player's inventory |
- Returns
- True if the item was successfully added to the player's inventory
◆ ConsumeItem()
bool ConsumeItem |
( |
Context | instigator, |
|
|
InventoryLibraryReference | reference ) |
Try to consume an item based on an item type. Successfully consumed items remove one from the stack count or are destroyed if not stacked.
- Parameters
-
reference | The InventoryLibraryReference of the item type to check |
- Returns
- True if the item was successfully consumed
◆ GetInventorySize()
Get the player's current inventory slot count.
- Returns
- Current inventory size
◆ GetPlayerName()
Gets the player's user name! This is unreliable immediately after spawning the character, as it may take some time to populate.
- Returns
◆ GetPlayerSlot()
Get the the player slot (runtime identifier) associated with this player.
- Returns
- Player slot runtime identifier
◆ PlayerHasItem()
bool PlayerHasItem |
( |
InventoryLibraryReference | reference | ) |
|
Check to see if player's inventory contains an instance of an item type.
- Parameters
-
reference | The InventoryLibraryReference of the item type to check |
- Returns
- True if player's inventory contains the item.
◆ SetInventorySize()
void SetInventorySize |
( |
Context | instigator, |
|
|
int | count ) |
Set the amount of slots in the player's inventory.
- Parameters
-
instigator | The source context triggering this change |
count | Target inventory size (0-10) |