In my project I want the player to choose between viewing the name label of the objects or not. My problem is with my moving objects, I have 4 lysosomes and I want their name label to show when the player presses ViewButton and each should have their name label and should move along with them. I have no Idea how to do that, can someone help me?
When you link objects, you need to have only 1 of each instance picked at a time.You can add the text when the main object is created or use something like a for each object. or other condition to choose 1 object at a time. Otherwise, GD will use the oldest created instance of that object.
For efficiency, you could split the logic up. Add and link the name object as a subevent of the button is released and then move the name object as a subevent that checks the variable. There’s no need to check the variable within the for each object. The value isn’t going to change and it’s using processing time for each instance instead of just once.
Button is released
Subevents
… For each object
… …add name and link events
Variable View of ViewButton =1
Subevents
… For each object
… … Move name events