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

0 favourites
  • 3 posts
From the Asset Store
Make a displayed number gradually increase or decrease, making an impression of a real-time counting.
  • 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

    3dprinterfactory.net.au/miscimages/thren.capx

  • 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)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you very much Blacksmith.

    I did work it out from your reply.

    many thanks.

    Just payed for a license :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)