Home   Help Search Login Register  

Author Topic: Fuel leak  (Read 489 times)

0 Members and 1 Guest are viewing this topic.

Mr.BoDean

  • Guest
Fuel leak
« on: 14 Jun 2003, 07:14:59 »
I want to simulate a leaking fuel tank .  
 
 I know the script would have to use _vehicle SetFuel ammount then I would like it to decrease by .05 every second.

So, how would I do this, with no getFuel command? (I'm using ver. 1.46)  Something like this?

;Theoretical Fuel Leak Script

#Leak
_Tank1 setFuel (_Tank1 getFuel -.05)
~1
goto "Leak"


 ???  non-scripted scripter   :o   Thanx :)

Mr.BoDean

  • Guest
Re:Fuel leak
« Reply #1 on: 14 Jun 2003, 08:18:47 »
Okay, I got this to work, although I forgot that only AIR vehicles have a fuel gauge, thus diminishing the visual effect.  ::)  But maybe there is a cleaner, more environmentally-sound way to do it?  ;)

;Fuel leak Script by Mr.BoDean

M1A1 SetFuel 0.95
~1
M1A1 SetFuel 0.90
~1
M1A1 SetFuel 0.85
~1
M1A1 SetFuel 0.80
~1
M1A1 SetFuel 0.75
~1
M1A1 SetFuel 0.70
~1
M1A1 SetFuel 0.65
~1
M1A1 SetFuel 0.60
~1
M1A1 SetFuel 0.55
~1
M1A1 SetFuel 0.50
~1
M1A1 SetFuel 0.45
~1
M1A1 SetFuel 0.40
~1
M1A1 SetFuel 0.35
~1
M1A1 SetFuel 0.30
~1
M1A1 SetFuel 0.25
~1
M1A1 SetFuel 0.20
~1
M1A1 SetFuel 0.15
~1
M1A1 SetFuel 0.10
~1
M1A1 SetFuel 0.05
~1
M1A1 SetFuel 0

exit


WOW! My first actual working script!!  :D    8)

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Fuel leak
« Reply #2 on: 14 Jun 2003, 08:19:25 »
Code: [Select]
#Leak
_Tank1 setFuel ( Fuel _Tank1 -.05)
? fuel _Tank1 == 0 : exit
~1
goto "Leak"

LCD OUT
« Last Edit: 14 Jun 2003, 08:19:59 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Mr.BoDean

  • Guest
Re:Fuel leak
« Reply #3 on: 14 Jun 2003, 08:22:36 »
Code: [Select]
#Leak
_Tank1 setFuel ( Fuel _Tank1 -.05)
? fuel _Tank1 == 0 : exit
~1
goto "Leak"

LCD OUT

Doh! Thanx, LCD , guess that is a little cleaner!  8)  But now I can't take credit for it ...hehe.   :P

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Fuel leak
« Reply #4 on: 14 Jun 2003, 12:37:39 »
u dont need 2 :P

just solve da topic (didnt i told u dat b4 ::))

btw da moon - its not cheese - i proved it last night ::) made outa bread ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta