-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added - respawn single unit to ares scripts. Better structure
- Loading branch information
Showing
2 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
Description: | ||
Respawns a single unit | ||
*/ | ||
|
||
params ["_pos"]; | ||
private _players = [] call FP_JRM_fnc_getSpectators; | ||
if (count _players == 0) exitWith {["ERROR: No dead players"] call ares_fnc_ShowZeusMessage}; | ||
private _names = [_players, {name _x}] call ACE_common_fnc_map; | ||
|
||
private _args = ["Respawn single unit", [ | ||
["Player", _names, 0] | ||
]] call Ares_fnc_ShowChooseDialog; | ||
|
||
private _plr = _players select (_args select 0); | ||
private _uid = getPlayerUID _plr; | ||
FP_JRM_savedState = [FP_JRM_savedState, {(_x select 0) != _uid}] call ACE_common_fnc_filter; | ||
publicVariable "FP_JRM_fnc_savedState"; | ||
|
||
[_pos] remoteExecCall ["FP_JRM_fnc_forceRespawn", _plr]; | ||
["Respawned %1 at %2", name _plr, mapGridPosition _pos] call ares_fnc_ShowZeusMessage; |