Hello everyone, could you tell me how to make the progress bar smooth? I am creating a fuel consumption band, but it changes in 1 second
The essence of the code is that when I press the gas pedal, the strip should decrease little by little
[video=youtube]https://youtu.be/W_TE8CHaJQI[/video]
// Displaying the fuel strip on the screen
Function FuelBarControl()
FuelPercent = Current_fuel / 300 * 100 // 300 this is the volume of a full tank
DrawBox( GetScreenBoundsLeft()+51, 53, GetScreenBoundsLeft()+FuelPercent+51, 72, MakeColor(0,128,0), MakeColor(0,128,0), MakeColor(0,128,0), MakeColor(0,128,0), 1 )
EndFunction
// Fuel consumption function
Function FuelFlow()
Current_fuel = Current_fuel - 0.7
EndFunction