Page 1 of 2

Tanks stopping when firing

Posted: Tue Aug 12, 2014 4:07 pm
by BotHunter
Hey guys!

I was hoping that one of you could show me where the code is that tells the bots to stop moving their tanks before the fire.
Like on an airplane, the bots keep moving as they fire. But when they are in tanks, the always stop to fire.

Thanks!

Re: Tanks stopping when firing

Posted: Tue Aug 12, 2014 7:01 pm
by Swaffy
I think it's the AI code. Cause if you turn on the bot stats, you can see their status change from Move to Fire. I guess they can't use both?

Re: Tanks stopping when firing

Posted: Tue Aug 12, 2014 7:47 pm
by Vilespring
I'm actually sure planes stop throttling when they start shooting, ever watch them? They slow down a bit!

Re: Tanks stopping when firing

Posted: Tue Aug 12, 2014 9:04 pm
by BotHunter
Thats too bad :(

Is there anyway I could cheat them into it?

Re: Tanks stopping when firing

Posted: Wed Aug 13, 2014 5:22 am
by Apache Thunder
Bots are hard coded to cease engine input (or reduce it in the case of aircraft) before they fire on something. It's to do with hard coded bot behaviors and such. Unfortunately there's no way to code around this. :(

It's less noticable with aircraft since planes can glide forward and bots usually don't slow them down enough to stall. Plus aircraft get's special treatment by the AI, so they automatically know they can't stop the aircraft, so they most keep moving while firing. But such behavior can't be translated to ground vehicles. Note if you attempt to give a ground vehicle aircraft typing in the AI, then the pathfinding for that vehicle will likely break. Aircraft ignore all pathfinding aside from maybe the combat zone. ;)

Re: Tanks stopping when firing

Posted: Fri Aug 15, 2014 6:27 pm
by BotHunter
Hmmm. Is there any way I can add a driver PCO to the tank that only AI could get into? So then I would have a driver and a shooter.

Re: Tanks stopping when firing

Posted: Fri Aug 15, 2014 8:47 pm
by Vilespring
I was about to ask that! it might, but then you would have tanks running around everywhere like jeeps only doing a drive-by and then capping.

Re: Tanks stopping when firing

Posted: Tue Aug 19, 2014 7:29 pm
by BotHunter
Yup! that would be a problem. I didn't think of that :D

Re: Tanks stopping when firing

Posted: Tue Aug 19, 2014 10:12 pm
by Swaffy
I think their aim while moving would be like setting a weapon's deviation minimum to like ... 50. :lol:

Re: Tanks stopping when firing

Posted: Wed Aug 20, 2014 12:06 am
by BotHunter
Hmmm

What about an If-then statement? Like this: (pseudo code)

If (gunner_position = "InUse") Then
Can_Drive = 1
Endif

Could this possibly be done?