Home   Help Search Login Register  

Author Topic: heli fuel script  (Read 1973 times)

0 Members and 1 Guest are viewing this topic.

stalker336

  • Guest
Re:heli fuel script
« Reply #15 on: 24 Feb 2004, 00:24:30 »
wohoo ok its working as long as chopper is on ground no fuel is used
as soon as its height is over 2 meters fuel starts being used
i no this script will seem very rough to some of you with the looping
but im just glad i got it working just in time with only 3 hairs left on my head ! its so easy but yet so hard . thnx for all yur help!

;fuel.sqs

  _chopper =_this select 0
 

#Update
 
_chopperheight = getpos _chopper select 2
?_chopperheight < 2 : goto "Update"

~2
 
#drain

_amount = fuel _chopper

_amount = _amount - 0.01

_chopper setfuel _amount

_chopperheight = getpos _chopper select 2
?_chopperheight < 2 : goto "Update"

? _amount == 0 : goto "exit"

~1.5
goto "drain"

#exit
exit

 

Fishion

  • Guest
Re:heli fuel script
« Reply #16 on: 24 Feb 2004, 09:55:55 »
i dont understand how fishion was calling 2 parameters the same
ie. drain=_this select 1
 chopperheight=_this select 1

Ahhh you are right about this mate, forgot to delete the _chopperheight.
As you might notice, it's not used.

-Fishion