mistaparadox 10 Posted August 19, 2014 Greetings, New mission editor here, only experience with the Arma 3 scripting isn't even scripting, it's messing with initialization lines and whatnot in the editor. I'm wondering if there's a way that I can use the "MPRespawn EH" in conjunction with the "addMPEventHandler" in the initialization line of a player or trigger or something of the sort rather than creating a script. Basically, what I'm doing is putting "this enableFatigue false;" in the unit init line to disable fatigue, but on respawn the unit is affected by fatigue again. I've read a few forum topics on here specifically about keeping init's on respawn, but they all involve already set-up scripts (which I, once again, have no experience with). I'd like to keep it in-game if it's possible, but if this is only resolved by actually scripting, then my followup question would be more information on the scripting process to make this happen. Thanks, MistaParadox Share this post Link to post Share on other sites
Jona33 51 Posted August 19, 2014 I've no experience with MP event handlers but I imagine the following would work. thisaddMPEventHandler ["MPRespawn", {this enableFatigue false;}]; Put that in the init line. Share this post Link to post Share on other sites
Beerkan 71 Posted August 19, 2014 I've no experience with MP event handlers but I imagine the following would work.Put that in the init line. Forget the unit's init in the editor. Put this in your init.sqf in the mission folder. This will effect ALL players.// Remove fatigue effects. if (local player) then { player enableFatigue false; player addMPEventhandler ["MPRespawn", {player enableFatigue false}]; }; You may also want to delete the player's old dead body. Put this in the init.sqf as well. // Delete Player's old dead body and gear on respawn in a puff of smoke. player addMPEventHandler ["MPRespawn", {_this spawn FNC_Del_Corpse;}]; FNC_Del_Corpse = {_unit = _this select 1; _pos = getPos _unit;_xpos = _pos select 0;_ypos = _pos select 1; _zpos = _pos select 2;sleep 0.3;for "_i" from 0 to 3 do {_xvel = 0;_yvel = 0;_zvel = 0;_tnt = 0; drop[["A3\Data_F\ParticleEffects\Universal\universal.p3d",16,7,48],"","Billboard",0,1 + random 0.5,[_xpos,_ypos,_zpos], [_xvel,_yvel,_zvel],1,1.2,1.3,0,[2],[[0.55,0.5,0.45,0],[_tnt + 0.55,_tnt + 0.5,_tnt + 0.45,0.16], [_tnt + 0.55,_tnt + 0.5,_tnt + 0.45, 0.12],[_tnt + 0.5,_tnt + 0.45,_tnt + 0.4,0.08], [_tnt + 0.45,_tnt + 0.4,_tnt + 0.35,0.04],[_tnt + 0.4,_tnt + 0.35,_tnt + 0.3,0.01]],[0],0.1,0.1,"","",""];}; deleteVehicle _unit;}; N.B. Missing space in Jona33's reply... should be this addMPEventHandler ["MPRespawn", {this enableFatigue false;}]; Share this post Link to post Share on other sites
mistaparadox 10 Posted August 19, 2014 Forget the unit's init in the editor. Put this in your init.sqf in the mission folder. This will effect ALL players.// Remove fatigue effects. if (local player) then { player enableFatigue false; player addMPEventhandler ["MPRespawn", {player enableFatigue false}]; }; You may also want to delete the player's old dead body. Put this in the init.sqf as well. // Delete Player's old dead body and gear on respawn in a puff of smoke. player addMPEventHandler ["MPRespawn", {_this spawn FNC_Del_Corpse;}]; FNC_Del_Corpse = {_unit = _this select 1; _pos = getPos _unit;_xpos = _pos select 0;_ypos = _pos select 1; _zpos = _pos select 2;sleep 0.3;for "_i" from 0 to 3 do {_xvel = 0;_yvel = 0;_zvel = 0;_tnt = 0; drop[["A3\Data_F\ParticleEffects\Universal\universal.p3d",16,7,48],"","Billboard",0,1 + random 0.5,[_xpos,_ypos,_zpos], [_xvel,_yvel,_zvel],1,1.2,1.3,0,[2],[[0.55,0.5,0.45,0],[_tnt + 0.55,_tnt + 0.5,_tnt + 0.45,0.16], [_tnt + 0.55,_tnt + 0.5,_tnt + 0.45, 0.12],[_tnt + 0.5,_tnt + 0.45,_tnt + 0.4,0.08], [_tnt + 0.45,_tnt + 0.4,_tnt + 0.35,0.04],[_tnt + 0.4,_tnt + 0.35,_tnt + 0.3,0.01]],[0],0.1,0.1,"","",""];}; deleteVehicle _unit;}; N.B. Missing space in Jona33's reply... should be this addMPEventHandler ["MPRespawn", {this enableFatigue false;}]; Thanks guys, it ended up working out by modifying the init.sqf Share this post Link to post Share on other sites