[Solved] How do I set object name by variable?

It is possible to set the object name by variable?

Current behaviour:
https://drive.google.com/file/d/14TGdPInfprO3O8BFM-tvwKgIoPDwDuhk/view?usp=sharing (link to video)

You see in the video also the debug of the variable LevelSelection.

I use the variable “LevelSelection” to store my selected object.

I know there is an error with the screenshot but this is also to same time my problem. How can I set the object name by a defined variable?

side note: Finally I will move it into a object group to do it more generic.

Add it to an object group, use a “For each object” event (using the object group as the object name/type) and use the object’s name in a compare 2 strings condition to select it. In the screen shot below, Group is the object group name:

BTW, your error is because yo are using Variable(…) (which returns a number), when you should be using VariableString(…)

1 Like

great works. thanks for the hint.