AI teamkilling in vehicles

Making or wanting help making your own asset? Check in here
Post Reply
mft004
Posts: 33
Joined: 2017-12-14 17:37

AI teamkilling in vehicles

Post by mft004 »

Hello,
sorry it's me again with another question stemming from my FH2 singleplayer sub-mod attempt. Basically it seems that the ai when driving a tank ignores checking whether there are any friendly vehicles in the way of a shot to hit an enemy vehicle; the common scenario is that two tanks are firing away at each other and a third tank from one side then joins in, but approaches behind the other friendly tank and fires a shot that teamkills the buddy, which would otherwise have hit the enemy.
I don't see this issue in terms of small arms fire; its rare to see a bot accidentally kill me or another bot with a rifle or machine gun, they tend to dodge or just hold fire. Would anyone know what rule is different when they're in vehicles, causing them to be clumsy? I'm guessing it's something to do with their awareness of the hit boxes for the friendly vehicles, but would welcome any input wizards out there might have. If I could find a fix it would make tank battles so much more enjoyable.
At first I thought that the fault could lie with the weaponTemplate.deviation and weaponTemplate.allowedDeviation lines pertaining to vehicle weapon ai instructions, with the idea that the bots aren't intending to hit their friend's tank but the deviation causes it instead. However this seems less likely as based on what I've seen ingame, one tank may be driving right behind the friendly tank and point-blank shoots it assuming there's nothing in the way between it and my tank opposing it.

Kind regards,
Mark
Last edited by mft004 on 2022-01-14 13:53, edited 4 times in total.
LangMaster
PR:BF2 Contributor
Posts: 176
Joined: 2020-10-11 03:15

Re: AI teamkilling in vehicles

Post by LangMaster »

I have seen that many times in coop, best place is khami at the bridge to spot this, but i don't think it happens all the time since i rarely see it, there must be some variables.
Image
mft004
Posts: 33
Joined: 2017-12-14 17:37

Re: AI teamkilling in vehicles

Post by mft004 »

My bad, I wasn't thinking straight; it was just a case of turning off friendly fire in the in-game server settings! The performance of the ai has dramatically improved : D

Kind regards,
Mark
Post Reply

Return to “PR:BF2 Community Modding”