How do I create a Jump currency?

0 favourites
  • 4 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Something like gold in a Mario game but every time the player jumps past a double jump, it wastes 1 jump gold, how can I do that?

  • Use a global variable var_gold to store gold.

    Have a sprite for your gold coins to collect.

    Player on collision with goldsprite

    - Add 1 to var_gold

    - Destroy goldsprite

    Set up a trigger that happens whenever your player double jumps. Maybe something like:

    Player is jumping

    On jump key pressed

    On your double jump trigger

    - Subtract 1 from var_gold

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Set up a trigger that happens whenever your player double jumps.

    On your double jump trigger

    I Meant something like this:

    You can double jump for free, but if you jump again after a double jump, only then will currency start depleting, with infinite further jumps after double (as long as the player has jump gold)

  • > Set up a trigger that happens whenever your player double jumps.

    > On your double jump trigger

    I Meant something like this:

    You can double jump for free, but if you jump again after a double jump, only then will currency start depleting, with infinite further jumps after double (as long as the player has jump gold)

    What calminthenight said works for that also. Just add an additional variable counting the number of times the player is jumping in the current jump 'set'. Then do a [if x>2 then subtract 1 gold]

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