-
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;[/QUOTE]
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;
};[/QUOTE]
This doesent work either. The AI just stand there. Am i stupid or is it a bug?
-
+ You will be deeply missed +
Try:
_x action ["DROPWEAPON",_x,primaryWeapon _x];
Planck
-
I just knew it was something easy like that! ***
Thanks alot! You are a very kind soul to help me out!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules