Jump to content
taskmaster065

I do not want coop mission to end when all players die [SOLVED]

Recommended Posts

Hi

 

I have made a coop mission. I want to run a script (which does a short end movie) after all players have died, and then end the mission using BIS_fnc_EndMission.

However, the mission ends as soon as the last playable man is killed and the standard "MISSION FAILED -All players died" ending occurs.

 

We are playing/testing it in the 3den editor (ie 3D editor) as non-dedicated server via LAN.

 

I am using 3D editor and have the following settings set within the editor in Attributes->Multiplayer menu:

- Respawn: Switch to side member;

 

- Ruleset:

-> Mission fail when everyone dead: not ticked

-> Single player death screen: not ticked

-> Switch to another character: ticked

 

- Allow Manual Respawn: ticked

- Enable Team Switch: ticked

 

I have spent hours searching online with no luck.

 

Any help would be greatly appreciated.

 

Share this post


Link to post
Share on other sites

I imagine that it is simply the default action for a MP mission when all players are dead, but having never created a MP mission I can't say for sure.

 

One of the most common ways of adding your own scripts to handle deaths is to switch the player to a 'container' elsewhere that is still alive.

You'll need to use selectPlayer in conjunction with  switchCamera  as part of an event handler for each player.

 

Alternatively, you can respawn the unit and switch their camera immediately after respawn.

This is how I've seen it done in MP missions I play and it works well - the unit is just left in a corner of the map somewhere.

 

This way, the player is kept alive in a sort of 'holding area' while their camera displays whatever you want it to while they are dead.

For all intents and purposes the player is 'dead'; with no input to the game (except for whatever camera controls you allow them) but the engine still believes players are alive and shouldn't end the game.

 

I'll see if I can find an example for you shortly.

 

 

EDIT: apologies if you've already tried this. I read you post again and it looks like you might have done

 

Edited by lawman_actual
re-read original post
  • Like 1

Share this post


Link to post
Share on other sites

Thanks. That's a good idea but how do you do it, as when all players are dead the mission ends immediately. An example would be great!

 

I thought it would be as simple as unticking  "Mission fail when everyone dead"  in the MP "Ruleset" but that did not work.

 

 

 

Share this post


Link to post
Share on other sites

Just setup respawn in the description.ext file like so:

respawn = "BASE";
respawnDelay = 4;

 

Share this post


Link to post
Share on other sites
15 minutes ago, taskmaster065 said:

Thanks. That's a good idea but how do you do it, as when all players are dead the mission ends immediately. An example would be great!

 

I thought it would be as simple as unticking  "Mission fail when everyone dead"  in the MP "Ruleset" but that did not work.

 

 

 

 

The community I play with uses a mission template that's adapted from Fersta Berinde's templates and has scripts pre-written for this kind of thing according to the community's preferences.

I'm looking through the files to try and find the appropriate scrip now but it's rather complicated.

 

I'll post if I do find something useful though :)

Share this post


Link to post
Share on other sites

We use respawn "SIDE: or "GROUP" in all our missions as we play with MP using teamSwitch. Building missions which allow teamSwitch allows us to play coop games when we do not enough players to fill all playable roles and the AI is being stupid. Also great when an AI cannot do something or is taking to long to do it (e.g. gets stuck, healing a wounded soldier, going into/out of buildings").

Share this post


Link to post
Share on other sites

Then you have your answer: No way to get what you want except creating some kind of unconciousness-script on your own or using one of the available revive scripts, like the fantastic A3 Wounding System from Psychobastard.

 

Share this post


Link to post
Share on other sites

Thanks for ideas.

 

We are already using AIS so with a little help from Psycho I was able to trigger an end scene. This is the trigger condition (see AIS thread mentioned) I used to detected when all players were dead or incapacitated:

 

"({!alive _x || {_x getVariable ["AIS_unconscious", false]}} count playableUnits) >= (count playableUnits)"

 

When trigger activated I executed end scene script:

 

"[] execVM "Scene_Outro_Loser.sqf;"

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×