Ares icon indicating copy to clipboard operation
Ares copied to clipboard

Add Changing respawn marker location

Open PHI-AM opened this issue 8 years ago • 1 comments

It would be cool to have a module to change the location of the respawn marker so you can change where people respawn during the mission. It works if you just change the location of the existing respawn marker and if the marker does not exist just creat a new one.

PHI-AM avatar Jul 02 '16 20:07 PHI-AM

We are currently using this:

private _toPos = TARGET POSITION
private _markerNamePart = PART OF MARKER NAME, e.g.: respawn_west also moves respawn_west_1 and respawn_west_2

private _foundMarkersCount = 0;
{
    if([_markerNamePart, _x, false] call BIS_fnc_inString) then {
        _x setMarkerPos _toPos;
        _foundMarkersCount = _foundMarkersCount + 1;
    };
} forEach allMapMarkers;
if(_foundMarkersCount > 0) then {
    hint format["Moved %1 marker(s) with name pattern *%2* to your position.", _foundMarkersCount, _markerNamePart];
} else {
    createMarker [_markerNamePart, _toPos];
    hint format["No marker named %1 found, created new one at your position.", _markerNamePart]; 
};

Will probably need 5 modules or setting for sides: all, west, east, guerrila, civilian

JakubNei avatar Jul 02 '16 20:07 JakubNei