Home   Help Search Login Register  

Author Topic: Three Team End Conditions  (Read 1456 times)

0 Members and 1 Guest are viewing this topic.

redmenace

  • Guest
Three Team End Conditions
« on: 02 Dec 2005, 00:56:04 »
hey,
I have a multiplayer mission where there are three teams: west, east, and civillian. West fights east, east fights west, and civillian can fight either. My question is how do I set up the triggers to end the mission if 2 out of the 3 teams are eliminated?

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Three Team End Conditions
« Reply #1 on: 02 Dec 2005, 01:41:54 »
Make three triggers all covering the entire map.

Trigger 1:
west not present
On Activation : west_dead = true

Trigger 2:
east not present
On Activation : east_dead = true

Trigger 3:
civilian not present
On Activation : civ_dead = true

Then you make three more triggers with no dimensions:

Trigger A:
Condition : east_dead && west_dead
On Activation : what ever code you want to indicate that the civies won!

Trigger B:
Condition : west_dead && _civ_dead
On Activation : what ever code you want to indicate that the east side won!

Trigger C:
Condition : east_dead && _civ_dead
On Activation : what ever code you want to indicate that the east side won!

For triggers A, B and C you could make those win1, win2 and win3 (if there are that many win options, I can't remeber off the top of my head).
« Last Edit: 02 Dec 2005, 01:44:30 by Raptorsaurus »

redmenace

  • Guest
Re:Three Team End Conditions
« Reply #2 on: 02 Dec 2005, 02:23:02 »
err.. so what exactly do I put in the on activation field of triggers A, B and C?

I tried putting win1, comes up with error.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Three Team End Conditions
« Reply #3 on: 02 Dec 2005, 03:22:44 »
In the trigger "type" pull down menu, you can select win1, win2, .... win5.  I have not experimented much with the different win options, so I am not sure how you would use them.  But if you are not doing anything advanced, just put something like this in the On activation field of triggers A, B, C:

Trigger A:
Condition : east_dead && west_dead
On Activation : hint "East and West are all dead.  The civilians win!!!"

Trigger B:
Condition : west_dead && _civ_dead
On Activation : hint "West and Civilians are all dead.  The East wins!!!"

Trigger C:
Condition : east_dead && _civ_dead
On Activation : hint "East and Civilians are all dead.  The West wins!!!"

Of course you can change the messages to whatever you want.  Or if you want to do some more advanced stuff, like run a different cutscene you could call a script that does the appropriate cutscene for which ever side wins.  Doing cut scenes involves advanced scripting, but there are nice tutorials in the editor depot on scripting and cut scene scripting.  For now it is probably best to keep the simple ending, but once you varify that the overall mission works and the ending triggers work ok, then latter on you could add more advanced stuff like ending cutscenes (they are called "outros").  To call a script from the On activation feild  you put something like:

[param1, param2....paramN] exec "myscript.sqs"

param1, param2 ....paramN are the parameters that you "send" to the script.  The script called "myscript" in this example is a script that you put in the mission folder.  This is all explained in the scripting tutorials in the editor depot.
« Last Edit: 02 Dec 2005, 03:30:14 by Raptorsaurus »

Durbs

  • Guest
Re:Three Team End Conditions
« Reply #4 on: 05 Dec 2005, 18:53:52 »
Quote
(if there are that many win options, I can't remeber off the top of my head).
There are 6 diffrent End switches :)

I have noticed in the past.....that a trigger that covers the whole map/ set to activate when east are not present...does not always work!

In a remake I made of serialkiller, sometimes if the killer(eastguy) boarded an empty car - it would trigger the "no east present" and end the mission.

Don't know why....just know that it does.  :P

(something to watch out for)
« Last Edit: 05 Dec 2005, 18:56:33 by ÐurbanPoisonâ„¢ »