Jump to content
Sign in to follow this  
D4RkLoRd

ai doesn't use mgun...

Recommended Posts

Hi,

I've coded some additional Shells to the M1abrams like APFSDS and I added a new machinegun. But now the Ai always uses the APFSDS against infantry instead of the machinegun... What did I do wrong?

Share this post


Link to post
Share on other sites

Hello D4RkLoRd,

If you post up the relevant sections of the config,

it might be easier to spot the problem.

smile_o.gif

Share this post


Link to post
Share on other sites

yeah, sorry forgot that...

Cfgvehicles -> M1abrams

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class M1Abrams : Tank

{

...

weapons[]={"d4t_120mmgun","d4t_abramsm2"};

magazines[]={"d4t_120mmAPFSDS","d4t_abramsm2"};

Cfgweapons

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class d4t_120mmgun : Gun120

{

displayName="M256 120mm Gun";

magazines[]={"d4t_120mmAPFSDS","Shell120"};

reloadTime=8;

autoReload=1;

};

class d4t_120mmAPFSDS : Shell120

{

ammo=d4t_120mmAPFSDSshell;

displayName="APFSDS-DU";

displayNameMagazine="APFSDS-DU";

shortNameMagazine="APFSDS";

nameSound="shell";

reloadTime=5;

count=6;

initSpeed=1540;

};

class d4t_abramsm2 : MachineGun7_6

{

displayName="M2 .50cal";

displayNameMagazine="M2 .50cal";

shortNameMagazine="MG";

count=4000;

initSpeed=853;

reloadTime=0.12;

soundContinuous=0;

};

Cfgammo

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class d4t_120mmAPFSDSshell : Heat120

{

airlock=0;

hit=1000;

indirectHit=0;

indirectHitRange=0;

explosive=0;

minRange=20;

minRangeProbab=0.9;

midRange=1500;

midRangeProbab=0.95;

maxRange=3500;

maxRangeProbab=0.4;

};

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  

×