How do I cancel an action under certain circumstances?

Get help using Construct 2

Post » Sun Jul 20, 2014 4:49 am

I have it to where wherever the player clicks a bullet shoots from the turret and adds one to "shotsfired". However when the player clicks "next wave" the turret shoots and it adds 1 to shots fired. How can I prevent this?
I have it set to where the turret is "deactivated" between waves but as soon as the player clicks on the next wave it shoots the bullet. I've also tried subtracting one and destroying the bullet but it doesn't seem to work either. I also have messed around with variables but no success.
B
9
S
2
Posts: 37
Reputation: 729

Post » Sun Jul 20, 2014 4:52 am

Delay the moment the turret becomes activated with the "System: wait action".

Or you can add a condition to make sure that the "shooting click" does not happen when the click occurs over the "Next wave" button. (Condition Mouse is over object / Inverted)
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,328
Reputation: 71,288

Post » Sun Jul 20, 2014 5:41 am

Kyatric wrote:Delay the moment the turret becomes activated with the "System: wait action".

Or you can add a condition to make sure that the "shooting click" does not happen when the click occurs over the "Next wave" button. (Condition Mouse is over object / Inverted)


I could have sworn I tried the "wait" option before and it didn't work. Got it, thanks!
B
9
S
2
Posts: 37
Reputation: 729


Return to How do I....?

Who is online

Users browsing this forum: matriax and 5 guests