Sesekriri Posted August 7, 2024 Share Posted August 7, 2024 Is there a command that allows me to count the quantity of an object in the world? For instance, if I wanted to count how many cactus, or stonefruit, or even trees, how would I do that? Also, is there a command to look at an item and give you the code to spawn it? The wiki does not always have the spawning code. Link to comment https://forums.kleientertainment.com/forums/topic/158916-command-questions/ Share on other sites More sharing options...
Spirit Glow Posted August 7, 2024 Share Posted August 7, 2024 c_announce(c_countprefabs("prefabname")) Not sure about the item code name Link to comment https://forums.kleientertainment.com/forums/topic/158916-command-questions/#findComment-1739675 Share on other sites More sharing options...
Arcwell Posted August 7, 2024 Share Posted August 7, 2024 If you want to check an item's prefab, you can do so with this command while hovering your cursor over the item. Ignore the number to the left, you only care about the text: c_announce(c_select()) Alternatively, you can find prefab names on the wiki (use .gg, not fandom) under the item info card, like so: To spawn an item, use either of these: c_spawn("prefab") c_give("prefab") c_spawn creates a prefab on your cursor, c_give puts the prefab into your inventory. If you want to spawn multiple items, just add a comma and the amount you want to spawn after "prefab". Here's an example: c_give("rope", 20) Link to comment https://forums.kleientertainment.com/forums/topic/158916-command-questions/#findComment-1739678 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.