toggle view for all instances of object

Get help using Construct 2

Post » Thu Apr 12, 2012 4:12 pm

Hi, I have multiple cloned objects on the layout. I am trying to figure out how once one of these is clicked, they are set to invisible (which i can do) but if any of the cloned objects are already invisible, they are then made visible (so there is only one invisible instance at a time)?

Is there anyway i can do this?


regardslukesnowden2012-04-12 16:13:37
B
4
Posts: 16
Reputation: 432

Post » Thu Apr 12, 2012 5:55 pm

You may need to store the UID of the last invisible instance in a global variable, and 'pick by unique ID'.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Apr 12, 2012 6:21 pm

Perfect place to use for each.
I would do something like:
>On sprite clicked, wait 1 second set opacity to 0
->for each sprite
-->sprite compare opacity <1, sprite set opacity to 100newt2012-04-12 18:25:54
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Thu Apr 12, 2012 8:20 pm

Cheers all. For anyone looking:

lukesnowden2012-04-12 20:21:11
B
4
Posts: 16
Reputation: 432


Return to How do I....?

Who is online

Users browsing this forum: spcsmrf and 11 guests