Jump to content
Sign in to follow this  
Ragnar_Darude

Action Drop Weapon does'nt work!

Recommended Posts

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

Try:

_x action ["DROPWEAPON",_x,primaryWeapon _x];

Planck

Share this post


Link to post
Share on other sites

I just knew it was something easy like that!  banghead.gif

Thanks alot! You are a very kind soul to help me out!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×