Home   Help Search Login Register  

Author Topic: Condition(s)  (Read 911 times)

0 Members and 3 Guests are viewing this topic.

Offline OFPWiZard

  • Members
  • *
Condition(s)
« on: 01 Feb 2005, 05:22:37 »
Where coudl i find the condition list and values.

I search the Online References and Turtorials but nothing came up in which i was looking for.

*****

I am wondering what i could put in the condition field of a trigger... or creating it within a script.

I am wondering becuase i just saw a trigger haven't this in it's condition field:

this or skip

the trigger was grouped with a soldier in a squad.

and also there is one with this in it's On Activation field:

skip = true


*****

does this mean like, skipping the trigger if the grouped unit isn't group or with it's group?

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Condition(s)
« Reply #1 on: 01 Feb 2005, 08:14:34 »

Offline OFPWiZard

  • Members
  • *
Re:Condition(s)
« Reply #2 on: 01 Feb 2005, 08:41:45 »
Thanks ;)

I'll look into that more.

***

But what is

this or skip

***

I might figure it out after i look around the information for awhile... but if anyones know, please reply.

I'll keep my part updated to tell ya if i found the information out.

Thanks again.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Condition(s)
« Reply #3 on: 01 Feb 2005, 22:03:00 »
what that means is that it will check to see if either the specified conditions at the top (anybody,present for example) or the boolean variable skip is true. if either is true, the trigger will run


But this is the answer to you're question:
ANY condition can be any form of code you want, as long as it returns ONLY a boolean value

for example

trigger:
east, not present

condition: this and (unit1 distance unit2 <= 50) and (varible1 - variable2 == 7.5) and somebooleanvariable
on activation: unit2 setdammage 1

what that does is checks for east not present and unit1 to be 50 or less from unit2 and one variable (a number) - another variable (also a number) = 7.5 and that a boolean varible (true/false) is true. if any of those are false, the trigger won't run. if you changed all of the AND's to OR, it would only need one of those to be true. i can give you more examples if you want, but its pretty straightforward

Offline OFPWiZard

  • Members
  • *
Re:Condition(s)
« Reply #4 on: 01 Feb 2005, 23:47:51 »
Thanks

I'll be looking into more of it.