Bots won't fire in Tanks.

Ask questions, discuss ideas, get answers
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Bots won't fire in Tanks.

Post by freddy »

Code: Select all

aiSettings.viewDistance 600
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Bots won't fire in Tanks.

Post by BotHunter »

Well What used to happen is the bots would get in rang, Stop, and fire. I shortened the AI range and now the bots come to where they use to come to, they stop, but there not in range, so they can't fire.
Walk quietly and carry a sniper rifle
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Bots won't fire in Tanks.

Post by Apache Thunder »

There's a separate view range:

Code: Select all

weaponTemplate.create TankGun
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.minRange 5.0
weaponTemplate.maxRange 250.0
weaponTemplate.exitVelocity 100
weaponTemplate.weaponActivate PINone
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantery  4.0
weaponTemplate.setStrength LightArmour 8.0
weaponTemplate.setStrength HeavyArmour 10.0
weaponTemplate.setStrength NavalArmour 6.0
weaponTemplate.setStrength Submarine   0.0
weaponTemplate.setStrength Air         1.0
(this is an example weapon template. You will need to look for which ai templates your tank weapons are using in your particular mod)

Look at "minRange" and "maxRange".

See if lowering these numbers help or perhaps extending them might fix it (depending on your situation. If they come in weapon range but don't fire the level global AI view distance is too low perhaps? Then you would lower the weapon view distance in this case).

If you have more then one weapon on the vehicle check to make sure the setStrength values don't match on both templates. This will cause bots to idle when they encounter an enemy if they conflict.
ImageImageImage
I have cameras in your head!
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Bots won't fire in Tanks.

Post by BotHunter »

Those are what I changed. I wanted the bots to get closer before they fired.
Walk quietly and carry a sniper rifle
Post Reply