![]() |
PowerQuest 0.19.4
|
Inventory: Contains functions and data for manipluating Inventory Items - Eg.
I.RubberChicken.Add();
I.Active.Description = "A rubber chicken with a pulley in the middle"
if ( I.Sword.Active )
Display: You can't use a sword on that
if ( I.HeavyRock.EverCollected )
Dave: I'm not lugging any more of those around
Inherits IQuestClickableInterface.
Properties | |
| string | Description [get, set] |
| Gets/Sets the name shown to players. | |
| string | Anim [get, set] |
| Use for setting the Gui AND cursor sprite/animation for the inventory item. Useful if the same sprite is used on both the gui and the cursor. | |
| string | AnimGui [get, set] |
| Use for setting the sprite/animation for the inventory item on the Gui. | |
| string | AnimCursor [get, set] |
| Use for setting the sprite/animation for the inventory item for the cursor. | |
| string | AnimCursorInactive [get, set] |
| Use for setting the sprite/animation for the inventory item for the cursor, when not over a clickable object. | |
| string | ScriptName [get] |
| The name used in scripts. | |
| bool | Active [get, set] |
| Whether this item is the active item for the current player (ie: selected item to use on stuff) | |
| bool | Owned [get, set] |
| Whether the current player has the item in their inventory. | |
| int | QuantityOwned [get, set] |
| How many of the item the current player has in their inventory (For stackable items) | |
| bool | EverCollected [get] |
| Whether the item has ever been collected. | |
| bool | FirstUse [get] |
| Returns true the first time the player "uses" the object. | |
| bool | FirstLook [get] |
| Returns true the first time the player "looked" at the object. | |
| int | UseCount [get] |
| Returns the number of times player has "used" at the object. 0 when it's the first click on the object. | |
| int | LookCount [get] |
| Returns the number of times player has "looked" at the object. 0 when it's the first click on the object. | |
| Inventory | Data [get] |
| Access to the base class with extra functionality used by the PowerQuest. | |
Public Member Functions | |
| void | Add (int quantity=1) |
| Gives the inventory item to the current player. Same as C.Player.AddInventory(item) | |
| void | AddAsActive (int quantity=1) |
| Gives the inventory item to the current player and set's it as active inventory. Same as C.Player.AddInventory(item) | |
| void | Remove (int quantity=1) |
| Removes the item from the current player. Same as C.Player.RemoveInventory(item) | |
| void | SetActive () |
| Sets this item as the active item for the current player (ie: selected item to use on stuff) | |
| T | GetScript< T > () |
| PowerQuest internal function: Access to the specific quest script for the object. Use the specific item class as the templated parameter so you can access specific members of the script. Eg: GetScript<InventoryKey>().m_inDoor = true;. | |
|
getset |
Gets/Sets the name shown to players.
|
getset |
Use for setting the Gui AND cursor sprite/animation for the inventory item. Useful if the same sprite is used on both the gui and the cursor.
|
getset |
Use for setting the sprite/animation for the inventory item on the Gui.
|
getset |
Use for setting the sprite/animation for the inventory item for the cursor.
|
getset |
Use for setting the sprite/animation for the inventory item for the cursor, when not over a clickable object.
|
get |
The name used in scripts.
|
getset |
Whether this item is the active item for the current player (ie: selected item to use on stuff)
|
getset |
Whether the current player has the item in their inventory.
|
getset |
How many of the item the current player has in their inventory (For stackable items)
|
get |
Whether the item has ever been collected.
|
get |
Returns true the first time the player "uses" the object.
|
get |
Returns true the first time the player "looked" at the object.
|
get |
Returns the number of times player has "used" at the object. 0 when it's the first click on the object.
|
get |
Returns the number of times player has "looked" at the object. 0 when it's the first click on the object.
|
get |
Access to the base class with extra functionality used by the PowerQuest.
| void Add | ( | int | quantity = 1 | ) |
Gives the inventory item to the current player. Same as C.Player.AddInventory(item)
| void AddAsActive | ( | int | quantity = 1 | ) |
Gives the inventory item to the current player and set's it as active inventory. Same as C.Player.AddInventory(item)
| void Remove | ( | int | quantity = 1 | ) |
Removes the item from the current player. Same as C.Player.RemoveInventory(item)
| void SetActive | ( | ) |
Sets this item as the active item for the current player (ie: selected item to use on stuff)
| T GetScript< T > | ( | ) |
PowerQuest internal function: Access to the specific quest script for the object. Use the specific item class as the templated parameter so you can access specific members of the script. Eg: GetScript<InventoryKey>().m_inDoor = true;.
| T | : | InventoryScript<T> |