S2ENGINE HD 2023
User guide
×
Menu
Index

ItemObject

ItemObject executes what item is built for.
For example the item for restoring the player health sends an "increaseHealth" message to the player when used. See Player messages.
It is spawned just when the user enters the inventory, opens the items page, selects the specific item cell and presses the use button command (see commands).
An itemObject doesn't execute anything by default, you must link it to a GameMachine that is executed when the itemObject is spawned. See Creating item logic.
 
ItemObject isn't directly inserted into the scene, but it is stored as prefab and referenced by the related itemTAG.
 
Following are the most important parameters of the ItemObject prefab:
The parameters have been showed as they are grouped. Actually they are not all in the same section.
6.3.2.2. ItemObject
1

MaxCount

1. MaxCount
<TODO>: Insert description text here...
2

TAGPrefab

2. TAGPrefab
<TODO>: Insert description text here...
3

Locked

3. Locked
<TODO>: Insert description text here...
4

targetObject

4. targetObject
<TODO>: Insert description text here...
5

icon

5. icon
<TODO>: Insert description text here...
6

iconLit

6. iconLit
<TODO>: Insert description text here...
7

GameMachine

7. GameMachine
<TODO>: Insert description text here...