Minor problem with a on/off mechanic

Get help using Construct 2

Post » Wed Jun 11, 2014 3:20 am

Hello there!

I've started a new project, and I need to toggle some elements when I click them with the mouse left button.
But that don't work and I can't figure why!
Moreover because when I use the left button for turn on the element and the right button to turn off that works, but not with just the left button.

Here is the capx:
https://dl.dropboxusercontent.com/u/443 ... chalk.capx
B
23
S
5
G
5
Posts: 112
Reputation: 4,737

Post » Wed Jun 11, 2014 3:55 am

Put a "wait 0 seconds" above the actions in Event 2.

The toggle happens, and the next event toggles it back off.
The wait makes it toggle after the tick is over, which is after the second event.

My preferred toggle is:
Image

If the frame = 0 the statement in parenthesis is true meaning it equals 1. 1 times 1 sets it to frame 1.
if the statement is false, (=1) 1 times 0 sets it to frame 0.
B
233
S
62
G
33
Posts: 902
Reputation: 40,398

Post » Wed Jun 11, 2014 4:07 am

Thank you!

I understand the "problem" now!
B
23
S
5
G
5
Posts: 112
Reputation: 4,737


Return to How do I....?

Who is online

Users browsing this forum: JackTYGA, osek95, zill and 35 guests