OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: NightJay0044 on 02 Jul 2004, 23:02:37

Title: Help, Objectives??
Post by: NightJay0044 on 02 Jul 2004, 23:02:37
I need to make a trigger at the same town that you start at, have it only activate when objective 1 is false and or it has failed and then the mission will end?? I already know how to activate it for a specific unit or soldier, so i just need to know how to activate it when objective 1 is false or incomplete. Thanks

Title: Re:Help, Objectives??
Post by: ponq on 02 Jul 2004, 23:08:50
In the trigger or script which sets objective 1 to failed add:
endgamenow = true

then have a trigger
activation: anyone, once

type: end #1

condition: endgamenow
Title: Re:Help, Objectives??
Post by: macguba on 02 Jul 2004, 23:12:26
Or if you want the player to be in a specific area, the trigger would be

Activation:  player present (or whatever)
Condition:   this and endgamenow

The point is that you are using a variable (endgamenow) as a "switch", to turn the trigger "on" when it is needed.     Until the variable is set to true by the objective1 failed trigger, this trigger cannot fire.
Title: Re:Help, Objectives??
Post by: NightJay0044 on 03 Jul 2004, 00:09:41
Sorry non of these work because i want to make a new trigger, because the one that has the objective failed in it is the alarm trigger because if you activate the alarm, objective 1 is failed. then i want a trigger at your home base when you return because of mission failed, to recognize that the alarm has been triggered and objective 1 has failed, and then i want the mission to end, and the trigger will also be activated by the group leader. thanks sorry for the confusion.
Title: Re:Help, Objectives??
Post by: macguba on 03 Jul 2004, 00:38:34
So you have a total of two [relevant] triggers:  

one sets off the alarm and sets endmissionnow=true and does 1 objstatus "failed"

the other is back at the starting position, is type End#1 and is fired by group leader (or whatever you like) present and endmissionow.
Title: Re:Help, Objectives??
Post by: NightJay0044 on 03 Jul 2004, 00:57:58
Nope still didn't work, i don't know whats wrong. okay in each town i have a trigger that activates the alarm. The trigger is.

---Trigger 1-----
AXIS A: 575 AXIS B: 575
ACTIVATION: West/Detected By east
TYPE: Switch, because it switches to the deactivation of the alarm.
ON ACTIVATION: Alarm=true; Hint "You were spotted"; "1" ObjStatus "FAILED"

----TRIGGER 2---(that has the sound for the alarm.)
AXIS A & B: 0
CONDITION: Alarm
EFFECTS/TRIGGER: Alarm

---TRIGGER 3-----
AXIS A & B: 0
COUNTDOWN: MIN:30 MAX: 130 MID: 40
CONDITION: Alarm
ON ACTIVATION: Alarm=false

----------------------
Thats it for triggers, then i need to create a trigger at the starting position with axis A & B: 130 then have it recognize that Objective 1 has failed and then the mission ends.

Thanks.
Title: Re:Help, Objectives??
Post by: ponq on 03 Jul 2004, 01:09:01
to trigger 1 add:
; endmissionnow=true

then create a new trigger, covering your homebase (as macguba said):
-present west groupleader
-condition: endmissionnow
-type end #1