Fuel = Fuel - Key Down Time

Instead of using key down time couldnt you use a timer? You can start(Set) the timer with jump key and then clear it with Jump released.

With timer you wont need to use event tick and check the key value condition every tick.

In this setup the fuel amount will drop .05 every .05 second. You can change those values as you please.

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 .

but that would be the same as the value of jumpkeyhold time, no need for that i think you misunderstood my question or i misunderstood your reply. Could you go in detail please ?

that will do it. thanks for the replies. I will check that out now