Jump to content
Sign in to follow this  
zxxxrhs

Making the AI use AP rounds against AFVs and HE against soft targets?

Recommended Posts

I noticed that it doesn't change round types. Is there any way to make it fire correct ammo?

Share this post


Link to post
Share on other sites
I noticed that it doesn't change round types. Is there any way to make it fire correct ammo?

The only way to really force AI to fire one type of ammo is to remove the other ammo types via the removeMagazines command.

Share this post


Link to post
Share on other sites

This is a small piece from an AI script by Bremmer. It causes a unit to load and fire a flare. Could possibly be some inspiration.

Could you use the removeweapon command to remove the vehicle weapon, then remove all the vehicles ammo. Then add one round of the desired type then re add the vehicle weapon? I have never tried removing weapons from vehicles so I have no idea if this would work

_unit dotarget _target

@ unitready _unit

_mags = magazines _unit

_mag = _mags select 0

_unit removemagazine _mag

_unit addmagazine _flare

_unit fire [_muzzle,_flare,_flare]

~2

_unit addmagazine _mag

exit

I guess muzzle and flare are variables so they can be defined depending on the type of unit, side etc

Edited by FriendlyIntentions

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  

×