Robin Withes 0 Posted May 19, 2017 I want to let medics be able to inject morphine into people. Script currenty looks like this: private["_unit"]; _unit = cursorTarget; if(isNull _unit) exitWith {}; //Not valid if(!([false,"Morphine",1] call life_fnc_handleInv)) exitWith { ["You need morphine to do this!","#d32df0"] spawn RLG_fnc_RLGNotificationSystem; }; if(player == _unit) exitWith {}; if(!isPlayer _unit) exitWith {}; ["Injecting morphine...","#d32df0"] spawn RLG_fnc_RLGNotificationSystem; player switchMove "AinvPknlMstpSnonWnonDnon_medic_1"; player playMoveNow "AinvPknlMstpSnonWnonDnon_medic_1"; waitUntil{animationState player != "AinvPknlMstpSnonWnonDnon_medic_1";}; _myPosition = getPos player; if (_unit distance _myPosition > 5) exitWith {["You need to move closer to your target!","#d32df0"] spawn RLG_fnc_RLGNotificationSystem;}; //Here i need to let a script run on _unit I need to let another script run on the _unit, i would appreciate some help! Share this post Link to post Share on other sites
Robin Withes 0 Posted May 19, 2017 I already defined my other script as a function btw. Share this post Link to post Share on other sites
7erra 629 Posted May 20, 2017 Can you share your function too? Otherwise try: //Here i need to let a script run on _unit [[arguments], _yourFunction] remoteExec ["call", _unit]; Share this post Link to post Share on other sites
Robin Withes 0 Posted May 20, 2017 I fixed my problem, i had to define my function in the cfgremoteexec.cfg Share this post Link to post Share on other sites