Home   Help Search Login Register  

Author Topic: Opposite commands?  (Read 779 times)

0 Members and 1 Guest are viewing this topic.

_Ross_

  • Guest
Opposite commands?
« 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

_hammy_

  • Guest
Re:Opposite commands?
« Reply #1 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"

_Ross_

  • Guest
Re:Opposite commands?
« Reply #2 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?
« Last Edit: 20 Jun 2003, 05:49:06 by _Ross_ »

borrowed soap

  • Guest
Re:Opposite commands?
« Reply #3 on: 20 Jun 2003, 06:08:42 »
i believe its
! (dude in jeep) : = [] exec "whatever.sqs"
« Last Edit: 20 Jun 2003, 06:09:25 by borrowed soap »

deaddog

  • Guest
Re:Opposite commands?
« Reply #4 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!!!!"


Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Opposite commands?
« Reply #5 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
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Opposite commands?
« Reply #6 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
Proud Member of the Volunteer Commando Battalion

deaddog

  • Guest
Re:Opposite commands?
« Reply #7 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.
« Last Edit: 20 Jun 2003, 14:27:31 by deaddog »