PythonConsole icon indicating copy to clipboard operation
PythonConsole copied to clipboard

How to find name of object and call it with Python Console?

Open VirtualCartographer opened this issue 3 years ago • 1 comments

when I run:

game.create_tree(vector_xz(cba[0].pos.x, cba[0].pos.z),"Alder")

The mod returns:

Error: Prefab 'Alder' not found (source: CreateTree) (script: line 7)

How do I find the proper name for this object and call it with the mod?

Also, can I call mod objects the same way? Can I call basic PO parts, like the plain PO cube?

VirtualCartographer avatar Nov 23 '21 01:11 VirtualCartographer

  1. Activate the Clipboard tool (ALT+A) and hover with your mouse over an existing instance of one such tree and you will see its internal name. btw, you can simplify the code as game.create_tree(cba[0],"<name>")
  2. Unfortunately that's not possible for now.

Strdate avatar Nov 24 '21 20:11 Strdate