Hello!
So I have been making a racing game and I have gotten nearly all of it down except for the boost function.
I have a boost bar that is an animation and stays on the HUD. Now I have a keyboard input (and will later implement touch controls as well) and the boost is controlled by the pressing of the Spacebar.
In the event sheet I have a global variable that matches the total animation frames (9) of the boost bar and when the space bar is pressed I want it to decrease the frame by one.
For some reason I am not able to decrease the frame by 1 all I am able to do is start/stop the animation.
I would like this because I also have an event: once the frame is changed on the boost bar animation the car speed in increased and the global variable Boost is decreased by one as well and once it is depleted it would refill the boost. Right now it is just refilling automatically as the animation is started and is stuck in a perpetual boosting of the car without even pressing throttle.
TL;DR I am trying to control an animation to go down by one as a space bar is pressed.
And Any hints on how to set the boost to reset every lap would help alot too (but that's extra)