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
24
S
7
G
4
Posts: 68
Reputation: 4,274

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
15
G
73
Posts: 2,026
Reputation: 43,459

Post » Sat Sep 14, 2013 7:03 pm

@plinkie Thanks, that did the trick!
B
24
S
7
G
4
Posts: 68
Reputation: 4,274


Return to How do I....?

Who is online

Users browsing this forum: Sparkz and 2 guests