OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: pazuzu on 10 Dec 2004, 06:28:28
-
Hi, I'm making a map with 6 objectives. The 1rst obj is to cature Taliban leader & the 5th is to rescue hostage.
I have a problem with how to make the alternative endings where the leader or hostage die or both.
Leader has to be injured to be "1" objstatus "done"; obj=true
If he dies then "1" objstatus "failed"; obj=false
The same with the hostage. She's either rescued or dies
So my qestion is how do I write it out in my End1 trigger to end game?
I got 6 obj & 1rst & 5th are not completed....
Right now I have: obj1 AND obj2 AND obj3 AND obj4 AND obj5 AND obj6 in the condition field for End1 trigger.
What do I put for condition for these alternate endings?
Thanks.
-
"1" objStatus "Failed"; "2" objStatus "Done"
The above is the combo you use for alt. endings.
just add in trig with whatever combination you have so 1 & 2 & 3 "Done" and 4 & 5 "Failed"
-
How would you write that out in the condition field for end trigger?
My attempts failed.
Thanks.
-
can you directly check to see if an objective is "done", "failed" etc?
the way i've done it is using global variables with booleans
Ex: when an objective is done you make a global variable true:
"1" objstatus "done";Obj1 = true
then you do that for each, and you can check for any possible variation:
in the trigger condition:
obj1 && obj2 && obj3 && obj4 && !(obj5) && !(obj6)
! means the opposite, or not. so if you have !(obj5) it means not obj5, or that it is false/null
-
Ok that makes sense....
I usually write it as: obj1 AND obj2 AND etc
You have && instead.....I'm assuming its the same thing?
Thanks again.
-
yes, exactly
just like:
? = if
|| = or
-
And emmmm:
== = = .............for conditional statements
Hehehehehehe
Planck