Jump to content
Sign in to follow this  
roguetrooper

MP respawn parameters selectable?

Recommended Posts

Is there a way to make the respawn parameters in MP maps selectable? Usually they have to be defined within Description.ext:

Respawndelay = 3;
Respawn = 3;
RespawnVehicle = 0;
RespawnVehicleDelay = 3;

As far as I know, this file does not allow scripting code, such as

RespawnDelay = paramsArray select x;
Respawn = paramsArray select y;

Nor is it possible to define these parameters within another sqf-file (?)

Edited by RogueTrooper

Share this post


Link to post
Share on other sites

id like to know this as well, and also if its possible ingame via a script to get what

Respawndelay = ?;

Respawn = ?;

RespawnVehicle = ?;

RespawnVehicleDelay = ?;

Share this post


Link to post
Share on other sites
also if its possible ingame via a script to get what

Respawndelay = ?;

Respawn = ?;

RespawnVehicle = ?;

RespawnVehicleDelay = ?;

An example:

_respawn = getText(missionConfigFile >> "respawn");
if (_respawn == "") then {
   _respawn = getNumber(missionConfigFile >> "respawn");
};

Just keep in mind that a config entry can either be a string, a number or an array (you can check it with isText, isNumber or isArray).

Those params can't be changed ingame, at least not without some tricks (like respawndelay with setPlayerRespawnTime).

Respawn = __EVAL(paramsArray select 0);

This would be cool but description.ext gets parsed quite early (multiple times btw) and paramsArray is not yet defined then.

Xeno

Edited by Xeno

Share this post


Link to post
Share on other sites

sweet tnx Xeno, testing now.

Edit: working perfectly.

Edit2: for me it was getting the respawntype and respawndelay, wich i did like this:

if (_unit in playableUnits) then {
_respawn = getText(missionConfigFile >> "respawn");
if (_respawn == "") then {
	_respawn = getNumber(missionConfigFile >> "respawn");
};
if ((str(_respawn)) == "0" OR (str(_respawn)) == "NONE") then {_respawn = "NONE"};
if ((str(_respawn)) == "1" OR (str(_respawn)) == "BIRD") then {_respawn = "BIRD"};
if ((str(_respawn)) == "2" OR (str(_respawn)) == "INSTANT") then {_respawn = "INSTANT"};
if ((str(_respawn)) == "3" OR (str(_respawn)) == "BASE") then {_respawn = "BASE"};
if ((str(_respawn)) == "4" OR (str(_respawn)) == "GROUP") then {_respawn = "GROUP"};
if ((str(_respawn)) == "5" OR (str(_respawn)) == "SIDE") then {_respawn = "SIDE"};
_respawnDelay = getNumber(missionConfigFile >> "respawnDelay");

_respawnArr = [_respawn,_respawnDelay];

Edited by Demonized

Share this post


Link to post
Share on other sites
An example:

_respawn = getText(missionConfigFile >> "respawn");
if (_respawn == "") then {
   _respawn = getNumber(missionConfigFile >> "respawn");
};

Just keep in mind that a config entry can either be a string, a number or an array (you can check it with isText, isNumber or isArray).

Those params can't be changed ingame, at least not without some tricks (like respawndelay with setPlayerRespawnTime).

This would be cool but description.ext gets parsed quite early (multiple times btw) and paramsArray is not yet defined then.

Xeno

Could you write some more detailed instructions on how and where I write what I had in "mission parameters" Respawn select.

I need to have two settings:

Normal (respawn = 3, respawnTemplates [] = {"f_spectator", "f_JIP", "MenuPosition"};)

Hardcore (respawn = 1, respawnTemplates [] = {"f_spectator", "f_JIP"};)

Share this post


Link to post
Share on other sites
sweet tnx Xeno, testing now.

Edit: working perfectly.

Edit2: for me it was getting the respawntype and respawndelay, wich i did like this:

if (_unit in playableUnits) then {
_respawn = getText(missionConfigFile >> "respawn");
if (_respawn == "") then {
	_respawn = getNumber(missionConfigFile >> "respawn");
};
if ((str(_respawn)) == "0" OR (str(_respawn)) == "NONE") then {_respawn = "NONE"};
if ((str(_respawn)) == "1" OR (str(_respawn)) == "BIRD") then {_respawn = "BIRD"};
if ((str(_respawn)) == "2" OR (str(_respawn)) == "INSTANT") then {_respawn = "INSTANT"};
if ((str(_respawn)) == "3" OR (str(_respawn)) == "BASE") then {_respawn = "BASE"};
if ((str(_respawn)) == "4" OR (str(_respawn)) == "GROUP") then {_respawn = "GROUP"};
if ((str(_respawn)) == "5" OR (str(_respawn)) == "SIDE") then {_respawn = "SIDE"};
_respawnDelay = getNumber(missionConfigFile >> "respawnDelay");

_respawnArr = [_respawn,_respawnDelay];

AHA! Just what I was looking for : -) Maybe I am in the same boat as Mates31cz here? I'd like to be able to offer a Pre-Mission Parameter choice between 'SIDE' or 'NONE'. It seems like you have the code I'd need there but I don't know how to call it in? How could I add that to form something for the class params?

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  

×