Home   Help Search Login Register  

Author Topic: Mixing AND and OR  (Read 1011 times)

0 Members and 1 Guest are viewing this topic.

seanver

  • Guest
Mixing AND and OR
« on: 28 Sep 2002, 18:13:57 »
I have this in a condition line of a trigger:

ins AND !(aP in a1) OR !(aP in a2) OR !(aP in a3)

I want the trigger to be activated when the condition ins is true and when the player isnt either in the vehicle callled a1, or in a2 or in a3. But it doens't work. Although when the player is in a car, he got killed (because the on Activation field has an aP setdammage 1 command).

 What's wrong?

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Mixing AND and OR
« Reply #1 on: 28 Sep 2002, 18:27:24 »
So you only want the trigger to go off if the player is not in one of those three vehicles?

If that is so, then replace your OR's with AND's ;)

Or failing that, use:

ins and (vehicle player == player)

if you want the Trigger to go off if the player is not in any vehicle

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Mixing AND and OR
« Reply #2 on: 28 Sep 2002, 18:29:37 »
Does it still activate when INS is true and the player is in car1 ?

I think what the game is saying is that;

INS AND !(... in car1)

is on possability,

and the other ones are,

OR !(... car2)

OR OR !(... car3)

Its a long shot, but what happens when you put ( ) around the whole OR cars section, so it would be;

ins AND (!(aP in a1) OR !(aP in a2) OR !(aP in a3))

seanver

  • Guest
Re:Mixing AND and OR
« Reply #3 on: 28 Sep 2002, 19:37:58 »
Sui you are right. What I had to do is to change the ORs with ANDs