Im trying to create a jetpack fuel calculation, look at the following:
The “jump key hold time” is the time in seconds of the jump key down.
I have the fuel = 3 and want to substract it from the keydown time.
The above screenshot is what doesnt work for now,
The Event tick calls every frame, that means every frame it substracts the given value of the key down.
So in the end the fuel value is for example “-190324” or something.
How can I make the fuel get less with the key hold time ?
for example if the fuel is 3 originally, and the key is down for 2 seconds, the fuel slides down to 1 .