|
Endstar LUA API Documentation
|
This class gives access to all the player specific things like inventory Checkout Game for ways to get access to the player object. More...
Public Member Functions | |
| 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 | PlayerHasItem (InventoryLibraryReference reference, int quantity) |
| Check to see if player's inventory contains an instance of an item type. | |
| bool | ConsumeItem (Context instigator, InventoryLibraryReference itemToConsume) |
| 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 | ConsumeItem (Context instigator, InventoryLibraryReference itemToConsume, int quantity) |
| 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. | |
| void | ClearAllItems (Context instigator) |
| Remove all items from this player's inventory. | |
| void | ClearAllItems (Context instigator, bool includeLockedItems) |
| Remove all items from this player's inventory. | |
| bool | AttemptGiveItem (Context instigator, InventoryLibraryReference itemToGrant) |
| Attempt to give player an item. | |
| bool | AttemptGiveItem (Context instigator, InventoryLibraryReference itemToGrant, int quantity) |
| Attempt to give player an item. | |
| bool | AttemptGiveItem (Context instigator, InventoryLibraryReference itemToGrant, bool lockItem) |
| Attempt to give player an item. | |
| bool | AttemptGiveItem (Context instigator, InventoryLibraryReference itemToGrant, bool lockItem, int stackableQuantity) |
| 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. | |
| void | SetInputSettings (Context source, int value) |
| Set the player's allowed input. | |
This class gives access to all the player specific things like inventory Checkout Game for ways to get access to the player object.
| bool AttemptGiveItem | ( | Context | instigator, |
| InventoryLibraryReference | itemToGrant ) |
Attempt to give player an item.
| instigator | The source context triggering this change |
| itemToGrant | The InventoryLibraryReference of the item type to give |
| bool AttemptGiveItem | ( | Context | instigator, |
| InventoryLibraryReference | itemToGrant, | ||
| bool | lockItem ) |
Attempt to give player an item.
| 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 |
| bool AttemptGiveItem | ( | Context | instigator, |
| InventoryLibraryReference | itemToGrant, | ||
| bool | lockItem, | ||
| int | stackableQuantity ) |
Attempt to give player an item.
| 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 |
| stackableQuantity | Quantity to give if stackable. |
| bool AttemptGiveItem | ( | Context | instigator, |
| InventoryLibraryReference | itemToGrant, | ||
| int | quantity ) |
Attempt to give player an item.
| instigator | The source context triggering this change |
| itemToGrant | The InventoryLibraryReference of the item type to give |
| quantity | Quantity to give. |
| void ClearAllItems | ( | Context | instigator | ) |
Remove all items from this player's inventory.
| instigator | The source context of this change |
| void ClearAllItems | ( | Context | instigator, |
| bool | includeLockedItems ) |
Remove all items from this player's inventory.
| instigator | The source context of this change |
| includeLockedItems | Should locked items be included? |
| bool ConsumeItem | ( | Context | instigator, |
| InventoryLibraryReference | itemToConsume ) |
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.
| instigator | The source context triggering this change |
| itemToConsume | The InventoryLibraryReference of the item type to check |
| bool ConsumeItem | ( | Context | instigator, |
| InventoryLibraryReference | itemToConsume, | ||
| int | quantity ) |
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.
| instigator | The source context triggering this change |
| itemToConsume | The InventoryLibraryReference of the item type to check |
| quantity | The amount to consume |
| int GetInventorySize | ( | ) |
Get the player's current inventory slot count.
| string GetPlayerName | ( | ) |
Gets the player's user name! This is unreliable immediately after spawning the character, as it may take some time to populate.
| int GetPlayerSlot | ( | ) |
Get the the player slot (runtime identifier) associated with this player.
| bool PlayerHasItem | ( | InventoryLibraryReference | reference | ) |
Check to see if player's inventory contains an instance of an item type.
| reference | The InventoryLibraryReference of the item type to check |
| bool PlayerHasItem | ( | InventoryLibraryReference | reference, |
| int | quantity ) |
Check to see if player's inventory contains an instance of an item type.
| reference | The InventoryLibraryReference of the item type to check |
| quantity | The quantity to check for |
| void SetInputSettings | ( | Context | source, |
| int | value ) |
Set the player's allowed input.
| value | Value as Input Settings |
| void SetInventorySize | ( | Context | instigator, |
| int | count ) |
Set the amount of slots in the player's inventory.
| instigator | The source context triggering this change |
| count | Target inventory size (0-10) |