Toggle between objects

Get help using Construct 2

Post » Thu Sep 20, 2012 10:00 am

If you play the attached file, you see how the green square disappear when its clicked, simultaneously as the blue one reappear. So far everything is doing what I want. However, then I want to be able to click the blue square again, so that the green one can reappear. And I am not able to do that??
Do you have any idea on how that can be done?
Toggle Between Objects
B
3
Posts: 6
Reputation: 362

Post » Thu Sep 20, 2012 12:14 pm

Use a variable, set it to 0 if you click one square and 1 if you click the other. Then set the visibility depending on the variable.

Example: Toggle.capx (r103.2)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Sep 20, 2012 12:33 pm

Excellent!! Thank you so much! :)
B
3
Posts: 6
Reputation: 362

Post » Thu Sep 20, 2012 12:54 pm

Or..actually. It doesn't seem to be working when I put the two squares on top of eachother. They are supposed to be alligned on top of eachother.
B
3
Posts: 6
Reputation: 362

Post » Thu Sep 20, 2012 12:54 pm

*aligned
B
3
Posts: 6
Reputation: 362

Post » Thu Sep 20, 2012 1:06 pm

Hmm, how about if you add a condition "Blue is visible" to the blue click event and the same for the green?
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Sep 20, 2012 1:44 pm

Nope! Still not working! :(
B
3
Posts: 6
Reputation: 362

Post » Thu Sep 20, 2012 1:53 pm

B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Sep 20, 2012 2:01 pm

Juuuhuuuuu!!! Thank you so much!! :))
B
3
Posts: 6
Reputation: 362


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, mnashwan, shinkan, stylie1, tarek2 and 10 guests