×

OnShelfInitOrMove

 

The "OnShelfInitOrMove" event is executed as soon as the player move or spawn a shelf;

This also provides the following information:

Input:

  • UniqueID - INTEGER64 - gives a unique number that identifies the shelf; this identifier does not change when the shelf is moved or a new day starts, but it is changed as soon as the game restarts.
  • Transform - TRANSFORM - It gives the position and rotation of the shelf (the size too, but it always remains at 1)
  • IDItem - NAME- provides the identifier of the item that is on the shelf (is "None" or "Default" if there is no item)
  • VariantItem - INTEGER- gives the variant number of the item that is on the shelf (is =0 if there is no item)
  • QuantityItems - INTEGER- gives the quantity of items that are on this shelf.
  • MaxQuantityItems - INTEGER- gives the max quantity of items that are on this shelf.

 

For get:

  • IDShelf - NAME- provides the identifier that allows you to recognize the type of shelf (example of a shelf type would be a shelf with plates)
  • VariantShelf - INTEGER- gives the number of the variant that is the shelf

You now need to call the function "GetShelfTypeByShelfID" with the UniqueID for get these two input (Documentation "GetShelfTypeByShelfID")