CoG Joel 0 Posted June 4, 2018 hay guys i been using this coding to kill warlord the place him in body-bag with ace then take him back to base to end complete mission but it work on eden but not my server plz help Warlord init ["ace_placedInBodyBag", { (_this select 1) setVariable ["UNITNAME",str(_this select 0)]; }] call CBA_fnc_addEventHandler; Game logic null = [this] spawn { _o = _this select 0; _nonComp = true; while {_nonComp} do{ _bags = _o nearObjects ["ACE_bodyBagObject", 50]; { if((_x getVariable "UNITNAME") == "Warlord")exitWith { "END1" call BIS_fnc_endMission; [west, "HQ"] sideChat "Warlord returned!"; _nonComp = false; }; } foreach _bags; }; }; Share this post Link to post Share on other sites
CoG Joel 0 Posted June 4, 2018 5 minutes ago, CoG Joel said: hay guys i been using this coding to kill warlord the place him in body-bag with ace then take him back to base to end complete mission but it work on eden but not my server plz help Warlord init ["ace_placedInBodyBag", { (_this select 1) setVariable ["UNITNAME",str(_this select 0)]; }] call CBA_fnc_addEventHandler; Game logic null = [this] spawn { _o = _this select 0; _nonComp = true; while {_nonComp} do{ _bags = _o nearObjects ["ACE_bodyBagObject", 50]; { if((_x getVariable "UNITNAME") == "Warlord")exitWith { "END1" call BIS_fnc_endMission; [west, "HQ"] sideChat "Warlord returned!"; _nonComp = false; }; } foreach _bags; }; }; i all so had someone say somthing bout " I think you need to change the setVariable commands to accept the public parameter" not sure wat he mean all how https://community.bistudio.com/wiki/setVariable Share this post Link to post Share on other sites
Dedmen 2714 Posted June 6, 2018 ["ace_placedInBodyBag", { (_this select 1) setVariable ["UNITNAME",str(_this select 0)]; }] call CBA_fnc_addEventHandler; -> ["ace_placedInBodyBag", { (_this select 1) setVariable ["UNITNAME",str(_this select 0), true]; }] call CBA_fnc_addEventHandler; Adding the public parameter to setVariable. Like is shown on the wiki page you linked. Share this post Link to post Share on other sites