OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: _Ross_ on 20 Jun 2003, 05:31:34

Title: Opposite commands?
Post by: _Ross_ on 20 Jun 2003, 05:31:34
is there some way to do the opposit of a command?
like:
?(Dude Not(in car))
or something like that?

thanks ;D
Title: Re:Opposite commands?
Post by: _hammy_ on 20 Jun 2003, 05:36:36
something like this

!alive:goto "dead"

! means not
alive checks if player is alive

so if the player is not alive, then it does to "dead"
Title: Re:Opposite commands?
Post by: _Ross_ on 20 Jun 2003, 05:47:00
so if i put

!dude in jeep:[] exec "something.sqs"
or would it be
!(dude in jeep):[] exec "something.sqs"


the script would execute when I got out of the jeep?
Title: Re:Opposite commands?
Post by: borrowed soap on 20 Jun 2003, 06:08:42
i believe its
! (dude in jeep) : = [] exec "whatever.sqs"
Title: Re:Opposite commands?
Post by: deaddog on 20 Jun 2003, 06:17:37
i believe its
! (dude in jeep) : = [] exec "whatever.sqs"

Don't believe this  ;D

It's:
?!(dude in jeep):[] exec "whatever.sqs"

-or-

?not (dude in jeep):[] exec "whatever.sqs"

no "=" sign before the []. (where on earth did you come up with that  :))  Also, no spaces after the ? or :

You could also do something like this:

?!("binocular" in weapons unitname):hint "I can't see!!!!"

Title: Re:Opposite commands?
Post by: LCD on 20 Jun 2003, 06:36:11
nd da best thing is dat u can also use

not instead of ! nd u dont have 2 put () ;D

LCD OUT
Title: Re:Opposite commands?
Post by: Messiah on 20 Jun 2003, 09:28:33
Also, no spaces after the ? or :

spaces do not affect the script in any way if put there
Title: Re:Opposite commands?
Post by: deaddog on 20 Jun 2003, 14:25:14
spaces do not affect the script in any way if put there

You're right.  I just tried it.  I must have thought that because I had an error once that I thought removing the space helped.   :hmm:

LCD is right about the parenthesis.  I like to use them because it makes the code easier to read, even if the situation did not call for them.