Home   Help Search Login Register  

Author Topic: Checking if true or false  (Read 424 times)

0 Members and 1 Guest are viewing this topic.

Ace Productions

  • Guest
Checking if true or false
« on: 21 Oct 2003, 23:03:17 »
I'm using the EH "engine" and it returns true or false if the engine is on or off.
I wrote the following scipt to utilise that and I'm receiving an error. Can someone please help me?

_pilot=_this select 0
_engstatus=_this select 1

#Prepare
?(_engstatus == true):GoTo "TakeOff"
~0.1
GoTo "Prepare"

#TakeOff
_pilot DoMove GetPos AirTar
~0
Exit

mikeb

  • Guest
Re:Checking if true or false
« Reply #1 on: 21 Oct 2003, 23:50:44 »
setpos instead of getpos?

could be?

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:Checking if true or false
« Reply #2 on: 22 Oct 2003, 00:20:31 »
_engstatus IS either true or false, it doesn't equal them, so try:

?(_engstatus): Goto "take off" etc.

To check if false use either !_engstatus or Not _engstatus.

You could also lose the #Prepare loop and use the @ command - the script will wait until the condition is met:

@ _engstatus
_pilot DoMove GetPos AirTar
etc.

See if that gets you off the ground!