How do I make a mouse click counter end game at a

Get help using Construct 2

Post » Wed Jul 17, 2013 8:54 am

Hi all, Im currently trying before buying.

Im making a shooter which has 15 targets and the player has 15 bullets.
hit a target and you score 1 point, the target "destroys", and points counter adds a point to score, this I have working.
If you hit a target or miss,(mouse click) the bullet counter subtracts a bullet from counter which starts at 15... got that working.

What I cannot work out is how to make the game either end or move onto the next level once the bullet counter gets down to zero. At the moment it will keep counting down into the negatives with mouse clicks.

Something like ...
"if bullet counter = 0 then end game" (play level 2) ...

Thanks for any help.
Cheers

http://3dprinterfactory.net.au/miscimages/thren.capxthren2013-07-17 09:03:19
B
13
S
3
G
1
Posts: 25
Reputation: 1,176

Post » Wed Jul 17, 2013 9:03 am

Hi @thren,

Try putting in an event that compares your score variable. If you select system events, there's a 'compare two values' option you can use. In your event you can say that, if bullet_var = 0, then go to new layout.

Good luck.

Edit: I've updated your capx to show you what I mean (updated capx)Blacksmith2013-07-17 09:14:27
B
33
S
6
G
7
Posts: 494
Reputation: 8,252

Post » Wed Jul 17, 2013 9:23 am

Thank you very much Blacksmith.
I did work it out from your reply.
many thanks.

Just payed for a license :) thren2013-07-17 09:27:34
B
13
S
3
G
1
Posts: 25
Reputation: 1,176


Return to How do I....?

Who is online

Users browsing this forum: DolyGamesCosmos and 17 guests