Pardon me... Can You help me about creating a script in a LUA Trigger in order to refuel vehicle at passage thru the station ?? Thanks a lot. Each time i want to refuel I use the console prompt and the following command line: energyStorage.getStorage('mainTank'):setRemainingRatio(1) or energyStorage.reset() But there's another option in East Coast... You drive to the fuel pump and a popup appears with two choices, refuel or cancel. Now I have to use this function in a LUA Trigger put beside the pump... I've tried to do that but failed to make a working script. (In the photo, the gas station at the end of the tunnel in "Endless Tunnel" map.)
The following code refuels all energy storages of the vehicle entering the Lua Trigger: Code: local function refuel(data) if data.event == 'enter' then be:getObjectByID(data.subjectID):queueLuaCommand('for i, storage in pairs(energyStorage.getStorages()) do storage.storedEnergy = storage.energyCapacity * clamp(1, 0, 1) end') end end refuel