Saturday, 10 May 2014

Never Run Out Of Fuel Cheat When Flying OR Driving


Looping Fuel Cheat


This idea was hashed around a bit on the original awm forum when wraith wanted to originally simulate a fuel leak along with a cheat that would keep you fueled,  another script he wanted to make was to reverse the leak and use it as a mid air refuel. Tomaz over at AWM helped out to shrink wraiths mad idea of almost 120 lines of code into this simple checksum.
This final code was from those inspiring talks..






The script was added to the AirwolfFXandAudio.pbo  called  ReFuel.sqs
If you have that addon installed you can simply use it within a Vehicles INT field

and can be run using this from an INT

[this] exec "\AirwolfFXandAudio\Scripts\ReFuel.sqs"

Like So

It can use [this] in the INT even if you've named the unit

 Placed In a Radio Trigger Would Be Like This

Note that in a trigger a unit needs to be defined [this] becomes [Airwolf]

So you MUST also name your Unit As So..

Unit Named (if script is in trigger Make Sure its removed from unit int)


Here Is How It Looks In Script Form

_veh = _this select 0

#check
?fuel vehicle _veh < 0.99: goto "ReFuel"
~0.01
goto "check"

#ReFuel
~0.01
_veh setFuel 1.0
goto "check"


You could modify the  < 0.99: and lower that to say 0.45, that would save on cpu usage running the script when fuel is lower, don't go under 0.20 because.. remember you can't use turbos once you hit a certain fuel level.

Here is a Video of it in action...




No comments:

Post a Comment

Please keep comments clean...

Note: only a member of this blog may post a comment.