OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: sabrejak on 11 Apr 2003, 05:33:27
-
i would like to end the mission after the lost part but don't know how?
and thanks to any one that helps ;)
---------------------------------------------------------------------------------
; Prepare it
scud_2 action ["SCUD Launch"]
scud_1 action ["SCUD Launch"]
titletext ["hurry the scuds will be launched soon", "Plain down"]
; Wait
~70
; Launch
scud_2 action ["SCUD Start"]
scud_1 action ["SCUD Start"]
; lost
~10
-
Have a trigger of type End #x wait for a variable, and make that variable true when it's time for that ending.
Example:
Trigger Once End #1
Condition: TrueEnd1
Activation: forceEnd
; the script
; Prepare it
scud_2 action ["SCUD Launch"]
scud_1 action ["SCUD Launch"]
titletext ["hurry the scuds will be launched soon", "Plain down"]
; Wait
~70
; Launch
scud_2 action ["SCUD Start"]
scud_1 action ["SCUD Start"]
; lost
~10
TrueEnd1 = true
...and the mission should end correctly. Be sure to initialize TrueEnd1 = false in init.sqs! If your mission is for multiplayer you should probably consider using publicVariable on TrueEnd1 = true, like this:
TrueEnd1 = true; publicVariable "TrueEnd1"
Am I clear as mud?
-
thank you :cheers: