Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: how to end a misson form a script  (Read 1872 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: