Ragnar_Darude 2 Posted August 29, 2007 To me, this should simply work: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{ Â Â _x sideChat format ["dropping weapon: %1", primaryWeapon _x]; Â Â _x action ["DROP WEAPON",_x,primaryWeapon _x]; } forEach units _unit; But it doesnt, the AI's refuses to drop their weapons. What i really wanted to do is this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _nearestammo = position leader _unit nearestObject "ReammoBox"; _ammodist = _nearestammo distance leader _unit; if (_ammodist < 20) then { {_x move position _nearestammo; _x sideChat "moving to ammobox";} forEach units _unit; waitUntil {unitReady(leader _unit)}; sleep 10; { _x sideChat format ["dropping weapon: %1", primaryWeapon _x]; _x action ["DROP WEAPON",_nearestammo,primaryWeapon _x];} forEach units _unit; }; This doesent work either. The AI just stand there. Am i stupid or is it a bug? Share this post Link to post Share on other sites
Planck 1 Posted August 29, 2007 Try: _x action ["DROPWEAPON",_x,primaryWeapon _x]; Planck Share this post Link to post Share on other sites
Ragnar_Darude 2 Posted August 29, 2007 I just knew it was something easy like that! Â Thanks alot! You are a very kind soul to help me out! Share this post Link to post Share on other sites