Home   Help Search Login Register  

Author Topic: Hmm What am I missing here?  (Read 707 times)

0 Members and 2 Guests are viewing this topic.

Mr.BoDean

  • Guest
Hmm What am I missing here?
« on: 26 Jun 2003, 11:28:04 »
I altered this script to add a sidechat in the middle of the fuel dump . The fuel part still works fine, but no sidechat.  What am I missing?  :-\

;Fuel leak Script

#Leak
T80 setFuel ( Fuel T80 -.05)
? Fuel T80 == 0 : exit
? Fuel T80 == 0.6 : goto "CHAT"
~1.5
goto "Leak"

#CHAT
PapaBear SideChat "OH NO! BLAHBETY-BLAH."
goto "Leak"

Knut Erik

  • Guest
Re:Hmm What am I missing here?
« Reply #1 on: 26 Jun 2003, 12:21:28 »
Do you have a unit named papabear?
You'll need to, or else put this in your init file
papabear = [West, "HQ"]

Mr.BoDean

  • Guest
Re:Hmm What am I missing here?
« Reply #2 on: 26 Jun 2003, 12:45:08 »
Do you have a unit named papabear?
You'll need to, or else put this in your init file
papabear = [West, "HQ"]


Yup, got that in Init.sqs   ;)

It worked fine when it was in a trigger, I just wanted to delay the message without adding another trigger just for that.  :P

deaddog

  • Guest
Re:Hmm What am I missing here?
« Reply #3 on: 26 Jun 2003, 15:14:01 »
It's very possible that the fuel amount of the tank never reaches exactly 0.6.  Try this instead:

;Fuel leak Script

_flag1=false

#Leak
T80 setFuel ( Fuel T80 -.05)
? Fuel T80 == 0 : exit
? Fuel T80 <= 0.6 and !_flag1: goto "CHAT"
~1.5
goto "Leak"

#CHAT
PapaBear SideChat "OH NO! BLAHBETY-BLAH."
_flag1=true
goto "Leak"

Mr.BoDean

  • Guest
Re:Hmm What am I missing here?
« Reply #4 on: 26 Jun 2003, 20:38:04 »
It's very possible that the fuel amount of the tank never reaches exactly 0.6.  Try this instead:

;Fuel leak Script

_flag1=false

#Leak
T80 setFuel ( Fuel T80 -.05)
? Fuel T80 == 0 : exit
? Fuel T80 <= 0.6 and !_flag1: goto "CHAT"
~1.5
goto "Leak"

#CHAT
PapaBear SideChat "OH NO! BLAHBETY-BLAH."
_flag1=true
goto "Leak"

Hmm, dd , that works great now, thanks!  :D  But can u explain why to me? Is it just that there is an extra condition to be checked which takes more time or something?  :hmm:

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Hmm What am I missing here?
« Reply #5 on: 26 Jun 2003, 20:41:29 »
cuz da fuel is never exactly 0.6 :P

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