Some of you might have seen me playing about with AmenMoses' driveable vehicles script. I'd like to go further and start introducing more variables, like fuel. To start with, I'm going to set the car up to have a specific amount of fuel, and I want the player to burn some for as long as they are pressing the accelerator key (in this case, W). I assume the best way to do this is with timers, so basically I'd like to know how to set up a timer that only...times...when the W key is pressed and subtracts fuel accordingly.
The end goal will be to give the player the ability to set the amount of fuel in the car before getting in, and giving them the ability to refill...HOWEVER, baby steps and all, right now I'd just like advise on that timer.
AE