Arcurus 4 Posted March 1, 2013 Searched around, but couldn't find an answer to my problem. I'm trying to add and action to the Action Menu for a multiplayer game to check the a variable and then tell the player what it is. The action gets the variable, but after a player dies and respawns they no longer have the action on their action menu. In my init.sqf I have the line player addAction["Check Thirst", "Survival_Mechanics\thirstStatus.sqf", [], 1, false, false, "", ""]; And that goes to thirstStatus.sqf: if (not((_this select 0)==player)) exitwith {}; sleep .5; Stxt = parseText format ["<t size='1.5'><t color='#99D5FF'>Thirst is at </t><t color='#99D5FF'>%1</t><br/><br/>", thirst]; hintSilent Stxt; I suspect that the problem lies in with how I added the addAction command moreso than the thirstStatus file. I just don't know how to get it implemented properly. Share this post Link to post Share on other sites
celery 8 Posted March 1, 2013 An action pertains only to the unit to which it was added. A respawned unit is not the same as the dead one. Share this post Link to post Share on other sites
Arcurus 4 Posted March 1, 2013 So how then would I go about getting it applied to any new unit created that is a player? Share this post Link to post Share on other sites
Kempco 10 Posted March 1, 2013 CheckThirstAction = player addAction["Check Thirst", "Survival_Mechanics\thirstStatus.sqf", [], 1, false, false, "", ""]; player addEventHandler ["killed",{ [] spawn { player removeAction CheckThirstAction; WaitUntil{alive player}; CheckThirstAction = player addAction["Check Thirst", "Survival_Mechanics\thirstStatus.sqf", [], 1, false, false, "", ""]; }; }]; Share this post Link to post Share on other sites