OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: sharkyjoe on 29 May 2006, 23:44:03

Title: Multi Objectives equals One End
Post by: sharkyjoe on 29 May 2006, 23:44:03
I have 7 scud launchers that must be taken out.
If anyone of them is still operational then the ending is failed.
However if they all out of working order then mission ends with a win.
My problem is how do I set the objectives so all 7 will make the one or the other end triggers end the game in a multipler game? ???
Thanks Sharkyjoe
Title: Re: Multi Objectives equals One End
Post by: Terox on 31 May 2006, 17:03:32


INIT.SQS

Quote
Tx_Objectives = [ scud1,scud2,scud3,scud4,scud5,scud6,scud7]
Tx_AllDestroyed = false
"" exec "Monitor.sqs"




MONITOR.sqs

Quote

#INIT
?!(local server):exit

#START
~5
if ({alive _x} count Tx_Objectives ==0)then{Tx_AllDestroyed = true; Publicvariable "Tx_AllDestroyed"; exit}else{goto "START"}


and then have an end trigger with condition  "Tx_AllDestroyed"


Nb>>  Requires you to add a standard bis logic to your mission, which you need to name   Server
Title: Re: Multi Objectives equals One End
Post by: sharkyjoe on 01 Jun 2006, 00:57:45
GLUP!!! :o
I thought it would be complicated. I've only dealt with SP mission objectives.
I will give this a go and see How I do.
Thanks so much for the info.