Home   Help Search Login Register  

Author Topic: how to end a misson form a script  (Read 1227 times)

0 Members and 1 Guest are viewing this topic.

sabrejak

  • Guest
how to end a misson form a script
« 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

Tactician

  • Guest
Re:how to end a misson form a script
« Reply #1 on: 11 Apr 2003, 13:36:56 »
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

Code: [Select]
; 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?

sabrejak

  • Guest
Re:how to end a misson form a script
« Reply #2 on: 12 Apr 2003, 06:02:55 »
thank you :cheers: