1 click goes through multiple events

Just started using Construct 2? Post your questions here

Post » Sun Feb 21, 2016 10:15 pm

When I do :

on touched sprite pause
and global var pause=0 --> set global var pause = 1

on touched sprite pause
and global var pause=1 --> set global var pause = 0


It seems that when I click on the sprite "pause", it first executes the first event, immediately followed by the 2nd event.
When running the game, you then do not see any change (because it happens so fast).
What am I doing wrong?
Or which topic already handled this? I could not find the right search to come up with answers from the forum.
My latest game is: Plants at www.rogerty.com
B
28
S
6
G
7
Posts: 683
Reputation: 5,686

Post » Sun Feb 21, 2016 10:28 pm

Don't break them apart
On touched
[sub-event] pause=0 -> pause=1
ELSE
pause=1 -> pause=0
ImageImageImage
B
71
S
22
G
258
Posts: 3,792
Reputation: 143,200

Post » Mon Feb 22, 2016 4:44 pm

Thanks!
My latest game is: Plants at www.rogerty.com
B
28
S
6
G
7
Posts: 683
Reputation: 5,686


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest