Thruster Bar

0 favourites
  • 1 posts
From the Asset Store
Custom animated Health Bar - check youtube video to make it yourself
  • Hello :)

    I have a thruster bar that is supposed to increase over time (up until a max). Then be "used up" when a key is pressed. The level of thruster available is displayed as a sprite with different animations (example: when thrustervariable = 5, display animation: thruster5).

    What has been happening is: when the x button is pressed, you cannot see the thruster bar move. It goes from max to zero.

    The code is essentially:

    • When "X" pressed, increase speed & start thruster decrease

    -When Thruster decrease = on,

       -Wait 5 seconds, decrease "thrustervariable" by 1

    • When "X" released, set speed to normal
    • When "X" released, set thruster decrease to off, set thruster increase to on.

    -When thruster increase is on, wait 10 seconds, then increase thrustervariable by 1

    ---

    *For any variable that is supposed to increase or decrease over time, do I have to give its display sprite priority over the event adjusting the variable?

    For example:

    every tick/display animation "thruster(thrustervariable)"

    when(x) pressed/wait 5 seconds/decrease thrustervariable by 1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)