Currently decompiling rust to look at how items are placed (like lanterns, etc.) As i need this concept as a part of a plug-in i wish to create.
Was wondering if anyone has already discovered this? it'd mean a lot if someone was able to save me this time and let me know where to find it.
Looking for the itemplace (of lantern, woodencrate etc. type) code
Discussion in 'Rust Development' started by Valkaaire, Jun 12, 2018.
-
This is kind of a hacky way to do it, I'm sure there are better ways, but here is how I normally spawn deployables.
Code:Item item = ItemManager.CreateByName("wall.external.high.stone", 1); var deployable = item.info.GetComponent<ItemModDeployable>().entityPrefab.resourcePath; var entity = GameManager.server.CreateEntity(deployable, position, rotation, true); entity.Spawn();
-
From having read it it seems like it'd be good, i'll have a look.
Thank you buddy! -
Code:var def = ItemManager.FindItemDefinition("wall.external.high.stone"); var deployable = def.GetComponent<ItemModDeployable>().entityPrefab.resourcePath; var entity = GameManager.server.CreateEntity(deployable, position, rotation, true); entity.Spawn();
-
The items i want to spawn are permanent, but thank you for trying to help me out!