OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 11 Feb 2004, 11:50:49

Title: 3 units not in group trigger
Post by: The-Architect on 11 Feb 2004, 11:50:49
I got three units which need to be destroyed in order for the mission to be completed. What do I put in a trigger to check if all three are destroyed? They are not in the same group.  :-\
Title: Re:3 units not in group trigger
Post by: Marvin on 11 Feb 2004, 12:23:22
If you got only three units, you can use
not alive unitname
and repeat this three times!
Title: Re:3 units not in group trigger
Post by: Marvin on 11 Feb 2004, 12:25:56
Or you can put it as
Not alive unitname1 and not alive unitname2 and not alive unitname3
This is on activation field in trigger
Title: Re:3 units not in group trigger
Post by: The-Architect on 11 Feb 2004, 12:36:50
So I put "not alive unitname" in the condition of the trigger 3 times for each unit?

It would look like this,

Condition: not alive target1; not alive target2, notalive ural
Activation: Blah, blah, blah

Is that what ur saying?
Title: Re:3 units not in group trigger
Post by: Marvin on 11 Feb 2004, 12:43:54
yes, byt dont forget to put and betwean each not alive unitname!
Title: Re:3 units not in group trigger
Post by: Marvin on 11 Feb 2004, 12:45:33
It looks like :

Condition: Not alive men1 and not alive men2 and not alive ural
the men1 and men2 and ural are the names of your units - you can use you`r own.

Activation: there you can put some things, like radio messages

Or you can use the End1, to end mission instantly after youve destroy them.
Title: Re:3 units not in group trigger
Post by: macguba on 11 Feb 2004, 12:51:11
No.   Changing the names is obviously fine, but use the syntax Marvin kindly gave you instead of making up your own.  ::)

Condition:  not alive target1 and not alive target2 and not alive ural
Activation:   blah blah blah

Head over to the comref and read up on the commands:-

and
not
or

Also read Scripting topics.

Now, there is an extra subtlety here.    If "ural" is a vehicle then don't use the alive command.   It's not very helpful with vehicles, because the vehicle can look destroyed when it is not.    Alive is best for loons.    For the ural you could use

(not canMove ural) and (not alive uralD)

Or you could have a trigger

Condition:    getDammage ural > 0.8
Activation:   ural setDammage 1

and then use "ural getDammage > 0.9" as your ending condition.


Edit:  beaten again  :P
Title: Re:3 units not in group trigger
Post by: The-Architect on 11 Feb 2004, 17:38:25
Cool thing guys.