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.
B
28
S
6
G
7
Posts: 678
Reputation: 5,676

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
240
Posts: 3,734
Reputation: 133,994

Post » Mon Feb 22, 2016 4:44 pm

Thanks!
B
28
S
6
G
7
Posts: 678
Reputation: 5,676


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest