Currently there is no way knowing if player initiated respawn by clicking the respawn button. The code that handles this is found at RscDisplayMPInterrupt.sqf and it would require only single line setVariable indicating if player was alive when respawn started
Description
Description
Details
Details
- Severity
- Feature
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- Scripting
Steps To Reproduce
Code that needs the modification:
case "buttonRespawn": { _display = ctrlparent (_params select 0); _respawn = [localize "STR_A3_RSCDISPLAYMPINTERRUPT_RESPAWNPROMPT",nil,localize "STR_A3_RSCDISPLAYCAMPAIGNLOBBY_RESPAWN",true,_display,true] call bis_fnc_guiMessage; if (_respawn) then { player setVariable ["playerAliveOnRespawn",alive player]; // Just this line needed if (alive player) then { missionNamespace setVariable ["RscDisplayMPInterrupt_respawnTime", time]; player setdamage 1; }; if (!isNil {missionNamespace getVariable "BIS_RscRespawnControls_escHandler"}) then { (uiNamespace getVariable "BIS_RscRespawnControlsMap_ctrlControlsGroup") ctrlSetFade 0; (uiNamespace getVariable "BIS_RscRespawnControlsMap_ctrlControlsGroup") ctrlCommit 0; }; _display closedisplay 2; }; };
Additional Information
This feature would be useful for detecting if player initiated the respawn him self, to teleport to another location and if so then the corpse could be removed via script