Results 1 to 3 of 3

Thread: Action Drop Weapon does'nt work!

  1. #1
    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 &#91;&#34;dropping weapon&#58; %1&#34;, primaryWeapon _x&#93;;
    *** ***_x action &#91;&#34;DROP WEAPON&#34;,_x,primaryWeapon _x&#93;;
    }
    forEach units _unit;[/QUOTE]

    But it doesnt, the AI&#39;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 &#34;ReammoBox&#34;;
    _ammodist = _nearestammo distance leader _unit;
    if &#40;_ammodist &#60; 20&#41; then
    {
    {_x move position _nearestammo; _x sideChat &#34;moving to ammobox&#34;;} forEach units _unit;
    waitUntil {unitReady&#40;leader _unit&#41;};
    sleep 10;

    { _x sideChat format &#91;&#34;dropping weapon&#58; %1&#34;, primaryWeapon _x&#93;; _x action &#91;&#34;DROP WEAPON&#34;,_nearestammo,primaryWeapon _x&#93;;} forEach units _unit;
    };[/QUOTE]

    This doesent work either. The AI just stand there. Am i stupid or is it a bug?

  2. #2
    Try:

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


    Planck

  3. #3
    I just knew it was something easy like that&#33; ***

    Thanks alot&#33; You are a very kind soul to help me out&#33;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •