OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: pazuzu on 26 Sep 2004, 05:22:26
-
I know I've seen this question posted here but I cant find it so here it goes...
How do I get my mission to end when all objectives are done?
I have 3 objectives & I want objective 3 to end the mission but only if obj 1 & 2 are done. I dont want players to be diverted & end the mission early by going straight to obj 3.
Thanks
-
This works for SP, don't know about MP though...
You should set variables for every objective. For example when you finish first objective variable Objective1 equals true (Objective1=true). Repeat this to second and third objective. Then you need fourth trigger which has condition:
Objective1 && Objective2 && Objective3
The trigger activates when all three objectives are set to be true, in other words, completed.
Should these variables be broadcasted with publicvariable ???
-
How ever your objectives are to be completed (trigger, scripted, ect.) set conditions to true in them.
For example, if the first objective is to defend a base you put in your trigger's on activation field or wherever 1stobj=true. Then when the second objective is done you put 2ndobj=true. In the third objective trigger or whatever, which ends the missions you'll have a condition like this && 1stobj && 2ndobj. This way the third trigger won't activate untill variables 1stobj and 2ndobj are both true and the trigger meets it's conditions.