OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Headhunter on 19 Jun 2004, 00:07:09
-
how do you make so that when you have destroyed 4 specific units it says "objective complete" and you win the mission?
-
Name the 4 targets target1, target2, target3 and target4.
Then create a trigger.
type: end #1
cond: !(alive target1) and !(alive target2) and !(alive target3) and !(alive target4)
on act: "1" setobjstatus "DONE"
Of course, if the objective wasn't 1 you'd have to change that.
:beat: *Gets Shot* :beat:
-
Well you make four triggers.
Trigger1: name this trigger1
in the condition field put NOT ALIVE target1
you can make target1 whatever you want
in the activation field put
trigger1done=true
Trigger2= name this trigger2
in cond. put NOT ALIVE target2
activation: trigger2done=true
Trigger3= name this trigger3
condition: NOT ALIVE target3
activation: trigger3done=true
Trigger 4 = name this trigger4
condition: NOT ALIVE target4
activation: trigger4done=true
Now make a trigger 5 and in the condition field put
trigger1done; trigger2done; trigger3done; trigger4done
activation: "1" objstatus "DONE"; EndMission1
That should do it, the trigger1done might have a space like trigger1 done, but I'm not sure and some of the syntax isn't garunteed. Play around with it if it don't work. :P
-
Use my version, roachies all fecked up with wrong syntax and all. :P ;D
:beat: *Gets Shot* :beat:
-
Use my version, roachies all fecked up with wrong syntax and all. :P ;D
:beat: *Gets Shot* :beat:
Ahem....clears throat. Speaking of wrong syntax.
on act: "1" setobjstatus "DONE"
Should be: "1" objstatus "DONE"
-
Err my answer says syntax isn't guarunteed so....
I'm not good at remembering code and all. :( ;D
Anyways setobjstatus? ;D :o
Mine's longer but I think but I dunno if mine is better if you want to implement titletext or something like target1 down.
I still gotta alotta learnin to do with ofp sytax... :P:tomato:
-
thanks guys, now in can finaly finish my mission