Home   Help Search Login Register  

Author Topic: .cpp question. How to make AI fire semi....  (Read 1684 times)

0 Members and 1 Guest are viewing this topic.

CAT_SHIT_ONE_MM

  • Guest
.cpp question. How to make AI fire semi....
« on: 07 Sep 2002, 09:10:47 »
Hi guyz.  I want to know how to make the AI fire more semi rounds because currently, they only fire burst mode dispite having a more accurate semi mode.  Where do I have to alter in the cfgweapons to do this.  I especially want to do this to my catak74su, catm16, and catm4 because I equip my MEU with these weapons and they always get killed because they try to fire the burst mode from 100 ~ 200 meters away and it never hits the target.... (I changed the dispersion mode for the burst so it will be hard to hit a target far away and so they could only use it for close range... (30 ~ 60 meters.)


Thanks I appreciate any help.   :D

OCOM_LMLVLM

  • Guest
Re:.cpp question. How to make AI fire semi....
« Reply #1 on: 07 Sep 2002, 09:28:02 »
I have no idea how to make it :-\, but it sounds good.........semi-auto is wayyy btter than full A  ;)

CrunchyFrog

  • Guest
Re:.cpp question. How to make AI fire semi....
« Reply #2 on: 07 Sep 2002, 11:48:40 »
Maybe you could play around with the:

aiRateOfFireDistance=XXX;

But, its a really annoying "bug" that AI prefers the burst, almost no matter what...

CAT_SHIT_ONE_MM

  • Guest
Re:.cpp question. How to make AI fire semi....
« Reply #3 on: 07 Sep 2002, 17:35:41 »
ok, thanks guyz.  Ya, it really really is a annoying bug.. But I also found out that for the ak74 which has 3 modes, semi, burst, and full auto, the ai "SOMETIMES" use the semi mode... so I thought that it might work if I add a "safe" mode to the weapon.  I'll tell you guyz what will happen when I test it.  Thanks guyz.  Cya.

Lucknow

  • Guest
Re:.cpp question. How to make AI fire semi....
« Reply #4 on: 08 Sep 2002, 14:50:29 »
You'll need to change the AMMO characteristics in the 'cfgAmmo' part of a config.cpp file if you want to vary what fire mode the ai uses.

In particular you'll need to change the values of ...

min/mid/max distance & min/mid/max probability

So for example if you want the AI only to use bursts for close range (under 60m) you can make a new ammo type called

'myBurstW'

and values of ...

mindistance=1
minprob=0.8
middistance=30
midprob=0.6
maxdistance=65
maxprob=0.4

but at the same time you you'll also need a new ammo type for semi mode (eg mySingleW) which starts with a mindistance value of 60m...

mindistance=60
minprob=0.7
middistance=200
midprob=0.5
maxdistance=600
maxprob=0.2

These are just examples so you'll need to experiment with other figures if you want to fine tune. Don't forget to change the 'ammo="xxxx"' part of the 'CfgWeapon' section too to contain your new ammo types.

However for my part I only really tweak weapons so the ai fires on full auto all the time which with differences in things like 'reload time, airateoffire, airateoffiredistance, and skill level' all make the ai troops fire at seemingy random modes.