Hello!
I’m working on a game where I want to give the player the feeling that they can modify the game’s reality by typing key words inside the game.
For example, I would like the player to be able to complete the sentence “Change all X into Y” by typing names for X and Y. So if the player types ‘Spike’ for X and ‘Key’ for Y, all the spikes should be changed to keys.
Now here is my problem: I can’t find a way to use a variable to store an object’s name and then to act as if it was the object’s name itself.
In the screenshot below, the instruction block marked in Red works perfectly fine (if the player types ‘Key’, all the Spikes are replaced by Keys). But in the instruction block marked in Green, the instructions are the same as previously, but the object’s name ‘Spike’ is stored in a scene variable. But this block doesn’t work, and I get an error message saying “Enter the name of an object” when I type the name of my variable containing the name of the object.
I hope I managed to explain my problem clearly enough, and I thank you in advance if you can find a solution to use a variable’s text to act as an object’s name!
Thanks a lot!
- GingerBread