Score system - bonus pickup/score

0 favourites
  • 7 posts
From the Asset Store
Pick Up Items Sound effects for your game, Take them for a ride right now and you will worry no more.
  • Hi guys.

    It is my first time posting here. I'm loving C2.

    I have a simple question... I think. But I don't know how to go about and do it.

    example

    In bomb jack, the player has to collect the bombs to score.

    However there is always one bomb that is lit. If you pick up that bomb you get a bonus and a new bomb turns on.

    <img src="http://retroflash.net/wp-content/uploads/2012/11/bomb_jack.jpg" border="0" />

    the bomb on the top left is lit.

    How do I go about doing that? It can't be scripted I think because you have to take in consideration that some bombs might not exist already because the player collected them.

    Any ideas?

    Thanks a lot.

  • Boolean instance variable

    .special = True or False

    If Bomb.Special then

    do special bomb stuff

    else

    do Regular bomb stuff

  • Thanks RangerJim,

    I didn't explain myself well because I didn't want the post to be too long.

    My doubt is more about how to attribute the "special" to a Bomb instance variable in a specific order, taking into consideration the bombs that might have been picked up already.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could always pick a random bomb to have the special "lit" designation.

  • Use the picking functions. Under system menu you'll find 'pick random instance' which would pick a single, random bomb. Or you could do it in more ordered fashion by using IID's and UID's.

  • knudle

    Give your bombs two instance variables

    • number "order"
    • boolean "activated"

    Then assign a specific order for each of your bombs starting from 0

    The event should look like that:

    Global number currentBomb = 0
    + System: bomb.Count > 0
    + System: while
    + System: order != currentBomb
        -> add 1 to currentBomb
    
    + bomb: order = currentBomb
    + bomb: [invert] is activated
        -> bomb: set activated to true
    
    + bomb: is activated
        -> do things

    != means different

    And be carefull this condition should really be a system event, not an object event (not object: order != currentBomb)

  • Thanks guys.

    I will try Yann's method as I want to control the order of the bombs being lit.

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