Counting Instance Variables

Get help using Construct 2

Post » Sat Sep 14, 2013 4:10 am

So I'm making a game where you need to drag 2 different objects to 2 different respective sides to diminish their number. The objects continuously spawn every 2 seconds and when 5 of either object are on screen at once you are supposed to be directed to a lose screen. My problem is that you are not directed to the lose screen.

https://www.dropbox.com/s/5t1v1q97vwvzghz/red%20vs%20blue.capx
B
26
S
8
G
4
Posts: 68
Reputation: 4,424

Post » Sat Sep 14, 2013 10:39 am

bluenum is always 1. you have it set to navigate when bluenum is 5. you need to make bluenum a global variable if it's going to act like a counter and add 1 to it whenever an enemy is created, subtract 1 when destroyed.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Sat Sep 14, 2013 7:03 pm

@plinkie Thanks, that did the trick!
B
26
S
8
G
4
Posts: 68
Reputation: 4,424


Return to How do I....?

Who is online

Users browsing this forum: Armench, Jackriduk, kiki4construct and 25 guests