Jump to content
Sign in to follow this  
goatboy

Mission Start / End help

Recommended Posts

I am trying to make a trigger for my mission so that the mission ends when one player is alive. There are 24 civilian players all vs all i just need it to say you are the winner when one is left is there an easy way of going about this.

All so am i right in saying if i have:

Description.ext

minPlayers = 24;

maxPlayers = 24;

This means the mission will not start unless there are 24 ppl that are ready ?

Thanks.

Goatboy

Share this post


Link to post
Share on other sites

minPlayers is just a guideline saying "you'll want x players to have fun" basically.

{alive _x} count allUnits <= 1

Might be an OK trigger condition, really depends on how you have things setup. This is assuming the 24 civ units are the only units on the map.

Share this post


Link to post
Share on other sites

I all so have 3 bluefor units.

Is there a way to make it so the mission will not start till 24 players are ready or the admin gives the ok ?

Share this post


Link to post
Share on other sites
minPlayers is just a guideline saying "you'll want x players to have fun" basically.

{alive _x} count allUnits <= 1

Might be an OK trigger condition, really depends on how you have things setup. This is assuming the 24 civ units are the only units on the map.

Problem if there's AI :)

{alive _x} count ([] call BIS_fnc_listPlayers) <= 1

For your second question, no, not in the lobby. You could in theory take away control until a condition is met when the game has started.

init.sqf

if (!isDedicated) then {
if (count ([]call BIS_nc_listPlayers) < 24) then {
	cutText ["Waiting for players","BLACK FADED",999];
	waitUntil {sleep 0.1;( count ([]call BIS_fnc_listPlayers)) >= 24)};
	cutText ["","BLACK IN",1];		
};
};

Not tested, I know players can still move around and fire their weapon which isn't exactly what you want.

There's also disableUserInput but I wouldn't recommend using that since players can't even quit the game unless they alt+f4.

There's probably a better solution.

The best way would be to not start the game until there's 24 players.

Share this post


Link to post
Share on other sites

If someone is logged in as admin the mission won't start till they click continue anyway.

Share this post


Link to post
Share on other sites

Description.ext

minPlayers = 24;

maxPlayers = 24;

So having that set like that means ppl will not b able to start it unless the admin starts it?

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
Sign in to follow this  

×