jshock 513 Posted January 28, 2015 JShock: I think it's because you're setting the variable on the dead body, then trying to read it from the new body. Well the killed EH sets the variable on the unit that was killed, then the respawn EH checks on the new unit, not the old. EDIT: Nvm get what your saying Spike...try this (#brain dead): player addEventHandler [ "Respawn", { if ((_this select 1) getVariable ["hasBeenInfected",false]) then { _newGrp = createGroup EAST; [(_this select 0)] joinSilent _newGrp; (_this select 0) setPos (getMarkerPos "respawn_east"); }; hintSilent format ["Are you infected?: ",(_this select 1) getVariable ["hasBeenInfected",false]]; } ]; Share this post Link to post Share on other sites
UpperM 14 Posted January 28, 2015 I have this when I die : But i'm still BLUEFOR In my Description.ext Respawn = BASE; My initPlayerLocal.sqf /* Fichier : initPlayerLocal.sqf Auteur : Utilité : */ //--- Fatigue OFF player enableFatigue false; player addMPEventhandler ["MPRespawn", {player enableFatigue false}]; //---- Autre execVM "intro.sqf"; //--- Auto Switch if (side player isEqualTo WEST) then { player setVariable ["hasBeenInfected",false,true]; } else { if (side player isEqualTo EAST) then { player setVariable ["hasBeenInfected",true,true]; }; }; player addEventHandler [ "Killed", { if ((_this select 1) getVariable ["hasBeenInfected",false]) then { (_this select 0) setVariable ["hasBeenInfected",true,true]; }; } ]; player addEventHandler [ "Respawn", { if ((_this select 1) getVariable ["hasBeenInfected",false]) then { _newGrp = createGroup EAST; [(_this select 0)] joinSilent _newGrp; (_this select 0) setPos (getMarkerPos "respawn_east"); }; hintSilent format ["Are you infected?: ",(_this select 1) getVariable ["hasBeenInfected",false]]; } ]; And i have my respawn_west and respawn_east. Share this post Link to post Share on other sites
jshock 513 Posted January 28, 2015 OMG, sorry long freaking day, forgot the "%1" in the format for the hint.... player addEventHandler [ "Respawn", { if ((_this select 1) getVariable ["hasBeenInfected",false]) then { _newGrp = createGroup EAST; [(_this select 0)] joinSilent _newGrp; (_this select 0) setPos (getMarkerPos "respawn_east"); }; hintSilent format ["Are you infected?: %1",(_this select 1) getVariable ["hasBeenInfected",false]]; } ]; Share this post Link to post Share on other sites
UpperM 14 Posted January 28, 2015 I have : Are you infected?: False Share this post Link to post Share on other sites
jshock 513 Posted January 28, 2015 Ok, hmm, see if adding a 5 second respawn delay changes anything... Share this post Link to post Share on other sites
UpperM 14 Posted January 28, 2015 Same "Are you infected?: False" Share this post Link to post Share on other sites