|
|
Line 1: |
Line 1: |
− | The SFurniture class is component of RoomFurniture
| + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/sfurniture |
− | | + | |
− | ==Members==
| + | |
− | {{ScriptFunction|int|InventoryItemID|;|Return the inventory ID of furniture.|5=
| + | |
− | furniture = Space.Scene.Find("Cube").Furniture<br>
| + | |
− | inventoryId = furniture.InventoryItemID;<br>
| + | |
− | ''--get InventoryID of the furniture.''<br>
| + | |
− | Space.Log(inventoryId);<br>
| + | |
− | ''--print the inventory id.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|StoreCustomData|(string key, string value);|Set custom key to furniture.|5=
| + | |
− | furniture = Space.Scene.Find("Cube").Furniture;<br>
| + | |
− | ''--get the roomfurniture component on your furniture.''<br>
| + | |
− | furniture.StoreCustomData("custom key","123")<br>
| + | |
− | ''--set key and value to the furniture.''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|GetCustomData|(string key); |Get custom data from furniture.|5=
| + | |
− | furniture = Space.Scene.Find("Cube").Furniture;<br>
| + | |
− | ''--get the roomfurniture component.''<br>
| + | |
− | Space.Log(furniture.GetCustomData("custom key"));<br>
| + | |
− | ''--get the value from furniture by key.''
| + | |
− | }}
| + | |
− | | + | |
− | | + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |
Latest revision as of 06:01, 19 September 2022
This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/sfurniture