Home   Help Search Login Register  

Author Topic: AI only use secondary weapon (RPG)  (Read 1886 times)

0 Members and 1 Guest are viewing this topic.

Offline trooper.ryan

  • Members
  • *
AI only use secondary weapon (RPG)
« on: 10 Feb 2008, 10:10:44 »
I've searched the forums to no avail, hopefully someone can point me in the right direction.

I've got a bunch of RPG soldiers that I want to only use the RPG launcher.

Even if I remove their primary weapons and switchweapon to the RPG7V, invariably they revert to holding no weapon.

Any idea how to convince them that they only have the RPG7V?

Cheers in advance.   :good:

Offline Loyalguard

  • Former Staff
  • ****
Re: AI only use secondary weapon (RPG)
« Reply #1 on: 13 Feb 2008, 17:58:27 »
Sorry it took so long to post a reply here...

...You mentioned you have tried the switchWeapon action, have you tried to selectWeapon Command?  If not, try it and see if that works.

...and just to be safe, make sure they also have ammo for the RPG7V in their inventory.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: AI only use secondary weapon (RPG)
« Reply #2 on: 13 Feb 2008, 21:40:27 »
:( I tried this a bit earlier, but I didn't get it to work. I hoped someone else would answer but, yeah...sadly, if you give them only the launcher, they'll run around with empty hands, and only shoulder the launcher when they're about to fire. It seems to me the AI -never- use the "run with launcher on shoulder" animation that's new in ArmA, as far as I could tell at least. Even short movements prompted a complete shouldering-reshouldering action.  :dry:

If it's just for a cutscene or something, you can try using the playmove animation. Here're the animations (from the BIKI):

Quote
AmovPercMrunSlowWlnrDb   -   Run backward with launcher
AmovPercMrunSlowWlnrDbl   -   Run backward left with launcher
AmovPercMrunSlowWlnrDbr   -   Run backward right with launcher
AmovPercMrunSlowWlnrDf   -   Run forward with launcher
AmovPercMrunSlowWlnrDfl   -   Run forward left with launcher
AmovPercMrunSlowWlnrDfr   -   Run forward right with launcher
AmovPercMrunSlowWlnrDl   -   Run left with launcher
AmovPercMrunSlowWlnrDr   -   Run right with launcher

Sorry we couldn't help any more! :(

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Hellbender

  • Members
  • *
Re: AI only use secondary weapon (RPG)
« Reply #3 on: 14 Feb 2008, 03:26:29 »
I have always thought this was one of the most annoying shortcomings of Arma (and OFP for that matter)!

The fact that you cannot, in some way, order a squad member to have his RPG or AT4 ready for those tanks you know are just on the other side of the hill, is strange i think! 

As for AI, I've messed with this myself to plan AI ambushes in towns, but eventually gave up.  :dunno:

Weird!

Offline trooper.ryan

  • Members
  • *
Re: AI only use secondary weapon (RPG)
« Reply #4 on: 01 Mar 2009, 06:23:45 »
I'm wondering if somehow we can set the AT weapon of a unit to be considered a primary weapon?

I have nfi idea about CfgWeapons but maybe you could define the AT weapon with #define WeaponSlotPrimary ?

Anyone know if you can modify CfgWeapons variables such as this on the fly, not in an addon?

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: AI only use secondary weapon (RPG)
« Reply #5 on: 01 Mar 2009, 10:53:28 »
No chance. There is no way to modify CfgWeapons from the running game.
try { return true; } finally { return false; }

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: AI only use secondary weapon (RPG)
« Reply #6 on: 01 Mar 2009, 15:14:39 »
Even if you configged the AT4 to be a primaryWeapon (or created an alternative AT4 that was a primary weapon), you'd then just have it held like a rifle which would look terrible! I hope there would be a better solution...
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Rommel92

  • Members
  • *
Re: AI only use secondary weapon (RPG)
« Reply #7 on: 01 Mar 2009, 22:47:37 »
...

My ArmA must be bugged, in any given firefight the RPG/AT soldiers always run with the launcher, and are always bloody using it, I can't get them to use their rifles without removing the AT.

 ???