Simple Fuel System

Hey guys, i know there's probably some easy solution for this and i bet it has something to do with variables.

I'm making a timetravel game and i have already successfully created my time machine. However, i'm trying to make a fuel system for it so that when the player flies it too many times the energy goes down.

Heres what i mean,

Initial Energy: 40%

The player then flies the machine.

Energy: 39%

The player flies it again

Energy: 38%

See where i'm going with this?, i dont need a super active complicated fuel system just something that goes down when the player uses it. 

And also if possible i would like to know a way i could refuel it by sending the increasing the number for example

Energy: 38%

Player refuels the machine

Energy: 100%

Any help is greatly appreciated, 

Thanks

Hudy
that sounds like a job thats perfect for variables ^_^

simply create your variable and then during your time travel event make a check to ensure the variable value is above 0. when you want to restore energy - simply increase the value of the variable..

Original thread: https://forums.rpgmakerweb.com/threads/simple-fuel-system.24440/