jaynic 1 Posted July 20, 2016 Hey all, I've built a script that handles the saving and loading of gear on player death and respawn. I utilize the setUnitLoadout, and getUnitLoadout functions to do this. eg: //init player addEventHandler ["Killed", { ["respawnLoadout\save"] call JNMP_x; }]; //When they respawn - all we need to do is load their loadout player addEventHandler ["Respawn", { ["respawnLoadout\load"] call JNMP_x; }]; //end init //save.sqf //Check that the respawn loadout system is active for the given player if(_respawnWithPriorLoadout) then { profileNamespace setVariable ["JNMP_respawnLoadout", getUnitLoadout player]; }; //end save //load.sqf if(_respawnWithPriorLoadout) then { //Save it to our profile variable _loadout = profileNamespace getVariable ["JNMP_respawnLoadout",nil]; if!(isNil "_loadout") then { if(typeName _loadout == "ARRAY") then { player setUnitLoadout _loadout; }; }; }; //end load But here's the funky problem... When I use the default revive system: the player enters a revive state, and drops his weapon. Therefore if he dies in this state: he respawns without his gun... Any ideas on how I can record his gear prior to him losing his gun? I can't find any event handlers in the system for players entering the incapped state... Share this post Link to post Share on other sites
zigzagtshirt 5 Posted August 29, 2016 Having the same problem. Spent hours and hours trying to make something work. Unit always respawns without rifle because the loadout isn't saved until after he has dropped his rifle when using vanilla revive. Hope someone on here can help. Share this post Link to post Share on other sites
Whiplash174 4 Posted June 1, 2017 I have the same problem. Its 2017 now butI see there's been no answer. Did you guys figure something out @zigzagtshirt and @jaynic Anyone else? Share this post Link to post Share on other sites