I’m making a game using a LOT of variables, and I created a function that when I trigger it, will hide an object whose name is stored in a variable (delete object1 when variable=object1). I expect to update the variable, trigger the function, hide the object, and continue with the game.
Why can’t I do that? Well, the “Hide” action doesn’t accept any other input instead of the object’s name, so I can’t make it universal (I would need to hide several objects, but only one at a time, modifying the variable and triggering the funcion).
An idea: Put all objects that can be hidden into a group, for example “HideableObjects”. Then assign each object a variable that stores the name, for example “nameObject = the name of the object”. And finally, when you need to hide an especific object, run a “pick up all objects” or “for each object” of the group “HideableObjects”, with the condition variable “nameObject = name of the object to hide”, and apply the hide action to it.
1 Like
how can i do that? i cant create a group