How bots "know" how to fire weapons.

Ask questions, discuss ideas, get answers
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

How bots "know" how to fire weapons.

Post by Vilespring »

In the Area 51 mod, there is a heavy tank that uses laser cannons, and those lasers have a one second delay to charge between order to fire, and actually firing. The bots, however, downright hate this and refuse to fire. Is this because bots don't like fire delays, or they don't like 2 fire arm bundles that fire with the same input/AItemplate?

I would like to know how bots like to think to solve this, because I need to know what I'm punching (besides my computer) to beat it.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: How bots "know" how to fire weapons.

Post by freddy »

Vilespring wrote: Is this because bots don't like fire delays, or they don't like 2 fire arm bundles that fire with the same input/AItemplate?
try add an mg on that bundle and see if they start shooting, if they do you could make some "invinsible" dummy weapon for the bots with no real damage or sounds etc.
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: How bots "know" how to fire weapons.

Post by Vilespring »

There are two overlapping bundles. The bundle that makes the charge effect is a dummy; it puts a knife projectile 500 meters in the sky.
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: How bots "know" how to fire weapons.

Post by POTAmatt »

...or they don't like 2 fire arm bundles that fire with the same input/AItemplate?
That's exactly right. Bots won't fire if there are 2 or more bundles with the same input/AItemplate. Simply 'rem' out the ai weapontemplate call to one of them in your weapons.con. In other words, only one of those firearms positions can have an active ai weapontemplate call.
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: How bots "know" how to fire weapons.

Post by Vilespring »

Will they fire if there is a bundle added to a bundle? (It works, believe it or not.)
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: How bots "know" how to fire weapons.

Post by POTAmatt »

Probably because the values in one of those templates are higher than the other, which is the other way around this issue. The problem occurs when there are multiple templates called with the same values where the bot can't make a decision.
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: How bots "know" how to fire weapons.

Post by Vilespring »

I sense a miss understanding. what I mean by..
Vilespring wrote:(It works, believe it or not.)
is the game actually lets firearm bundles be attached to firearm bundles, not the bots shoot it. :lol:
I need to think about what I type a bit more :P
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
POTAmatt
Posts: 89
Joined: Mon Dec 07, 2009 9:09 pm
Location: New Yawk

Re: How bots "know" how to fire weapons.

Post by POTAmatt »

Haha. Gotcha. But, either way, i hope that clarifies the situation.
takiwa
Posts: 134
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

Re: How bots "know" how to fire weapons.

Post by takiwa »

Vilespring wrote:In the Area 51 mod, there is a heavy tank that uses laser cannons, and those lasers have a one second delay to charge between order to fire, and actually firing. The bots, however, downright hate this and refuse to fire. Is this because bots don't like fire delays, or they don't like 2 fire arm bundles that fire with the same input/AItemplate?

I would like to know how bots like to think to solve this, because I need to know what I'm punching (besides my computer) to beat it.
A delay in firing due to a charge-up or recharge should be no different than a reload delay in vanilla BF1942. Your problem must lie elsewhere.

Post your AI weapon template, and we may be able to spot the problem :)
Image
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: How bots "know" how to fire weapons.

Post by Vilespring »

Code: Select all

rem *** Ax_Heavy_TankGunBarrel ***
ObjectTemplate.create FireArms Ax_Heavy_TankGunBarrel
ObjectTemplate.setNetworkableInfo TankFireArmInfo
ObjectTemplate.loadSoundScript /Sounds/T34Cannon.ssc
ObjectTemplate.geometry Ax_Heavy_Tank_Barrel
ObjectTemplate.aiTemplate Ax_Heavy_TankMainGun
ObjectTemplate.projectileTemplate Ax_Heavy_TankProjectile
ObjectTemplate.projectilePosition 0/0/0
ObjectTemplate.addFireArmsPosition -.5/0/3.93 .1/0/0
ObjectTemplate.addFireArmsPosition .5/0/3.93 -.1/0/0
ObjectTemplate.magSize 2
ObjectTemplate.numOfMag 45
ObjectTemplate.velocity 1000
ObjectTemplate.autoReload 1
ObjectTemplate.reloadtime 2
ObjectTemplate.roundOfFire 1
ObjectTemplate.fireingForce 100
ObjectTemplate.recoilSpeed 5
ObjectTemplate.recoilSize 20
ObjectTemplate.setAsynchronyFire 1
ObjectTemplate.fireDelay 1




rem *** Ax_Heavy_TankDummyGunBarrel ***
ObjectTemplate.create FireArms Ax_Heavy_TankDummyGunBarrel
ObjectTemplate.setNetworkableInfo TankFireArmInfo
ObjectTemplate.aiTemplate Ax_Heavy_TankMainGun
ObjectTemplate.visibleBarrelTemplate e_Gun_Buildup
ObjectTemplate.projectileTemplate KnifeProjectile
ObjectTemplate.projectilePosition 0/500/0
ObjectTemplate.addFireArmsPosition 0.5/0/-3 -180/0/0
ObjectTemplate.addFireArmsPosition -0.5/0/-3 180/0/0
ObjectTemplate.magSize 2
ObjectTemplate.numOfMag 45
ObjectTemplate.velocity 1000
ObjectTemplate.autoReload 1
ObjectTemplate.reloadtime 2
ObjectTemplate.roundOfFire 0.5
ObjectTemplate.fireingForce 0
ObjectTemplate.recoilSpeed 0
ObjectTemplate.recoilSize 0
ObjectTemplate.setAsynchronyFire 1
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
Post Reply