Home   Help Search Login Register  

Author Topic: trigger conditions?  (Read 1112 times)

0 Members and 1 Guest are viewing this topic.

sgtGunneryHighway

  • Guest
trigger conditions?
« on: 08 Oct 2002, 13:02:26 »
1st thing:
it is possible to activate a trigger when you only reached a specified height ?
(lil example :the first floor of a house)
2nd thing:
if somebody know where can i find some documents who talking about condition fields plz post here
thanks !

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:trigger conditions?
« Reply #1 on: 08 Oct 2002, 14:15:54 »
What do you want to know about conditions?

Basically, it's a field, where you define the conditions
to be met.

e.g:

create a trigger,

west/present/once

- case1;
condition: this
activation: hint "trigger has been activated"

:note - "this" means, the condition field is false, as long as
no west unit entered the trigger area.
Once a west unit enters the trigger's area, a hint message
will appear, showing you: TRIGGER HAS BEEN ACTIVATED
- case2;

condition: true

:note - "true" means, that the condtition of this trigger is already true, so no west units has to enter it.
This means: the hint messages appears, as soon as the mission starts.

case3;
any other condition, which can be altered by any influence.
e.g:
condition: "alive _x" count (units groupx) == 0

this condition would become true, once all units of groupx
are down

or;

condition: kingishere

this condition would become true, once you say somewhere
else (trigger, waypoint, script): kingishere = true

or;
condition: a == 3

this condition would become true, once the variable "a" has
a value of 3

:note - numeric variables need to be initialized at the start
of the mission (init.sqs/init-field of a unit/init trigger)
there are more ways, of altering a numeric variable so
that it becomes a certain value;

a = 3
:would directly alter variable "a" to be "3"

a = a + 1
:let's say you initialised variable "a" to start with a value of 0
a = 0, and you say: a = a + 1
Then the value of "a" would be "1"
If you repeat this twice times, the value of "a" would reach "3"

case4;

condition: cadetmode
or
condition: !cadetmode

The first condition would become active, if the mission runs
in cadetmode, while the second one expects "not cadetmode".

OK, there are many more ways to use the condition fields, but
i think i could uncover the basics for you now.

Look into the editor's depot at this site, and you may find some unofficial comrefs or tutorials, which might give you
even more info about that.

:edit
uuh yeah, there's one more thing, worth telling you here.

case5;

condition: this AND kingishere

this condition would be met, once "this" (in our case: west/present) AND kingishere became true.

or:

condition: this OR kingishere

this condition would be met, once "this" (west/present)
OR kingishere became true.

~S~ CD
« Last Edit: 08 Oct 2002, 14:20:02 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:trigger conditions?
« Reply #2 on: 08 Oct 2002, 18:03:44 »
to check if a unit is above a certain height use this in a condition field

getpos unitname select 2 >= 5

the 5 is how many metres above ground to check

sgtGunneryHighway

  • Guest
Re:trigger conditions?
« Reply #3 on: 08 Oct 2002, 19:44:29 »
hehe tnx m'8'z 8)

Chris IX

  • Guest
Re:trigger conditions?
« Reply #4 on: 08 Oct 2002, 23:49:36 »
I got a whole list of conditions and commands.
If ya like I can copy and paste.
Too large for attatchment