Thruster Bar

Get help using Construct 2

Post » Sun Nov 04, 2012 9:49 pm

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
B
5
S
1
Posts: 14
Reputation: 754

Return to How do I....?

Who is online

Users browsing this forum: Colludium and 28 guests