Making bots shoot through walls

Ask questions, discuss ideas, get answers
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Making bots shoot through walls

Post by BotHunter »

Hello all! I've been making a shield generator for Area 51. I made it so you can drive and walk through it but not shoot. that it until you pound the shield enough that it goes down. but my problem is that the bots see the shield as a solid wall that they can't shoot through. so my question is thus; is there any way to make the bots shoot just as the shield wasn't there? Thanks!

Here is a pic of the shield:

Image
(http://www.mediafire.com/view/0v6618m1f ... ld_Gen.bmp)
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: Making bots shoot through walls

Post by Apache Thunder »

I think one way to solve it is to spawn a bot into the shield PCO. (set it up so the bot can't escape it). The spawn group that puts him into it would have the AIEnterOnSpawn command and the spawn group for it set to AI only.

Once you got a bot in it, (make sure the shield PCO has a AI template!), then enemy bots will fire at it since it's occupied and recognized as a enemy unit. Aside from that I don't think you can get bots to shoot through a solid object they can't see through. (unlike us humans, the alpha texturing of the shields means nothing to them. It's the collision mesh they only see and from their point of view, the shields are 100% opaque)

I think Operation Market Garden had bots spawn into a PCO version of the factory object so that bots would try to destroy it. Look at that map as the example on how to set up your shields.
ImageImageImage
I have cameras in your head!
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Making bots shoot through walls

Post by BotHunter »

Dang :) I was hoping there was an easier solution. :P
Walk quietly and carry a sniper rifle
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Making bots shoot through walls

Post by Vilespring »

Put holes in it. Make it use chance.
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"
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Making bots shoot through walls

Post by BotHunter »

But then they could shoot through it every once and a while :) I'm probably going to make it a PCO.
Walk quietly and carry a sniper rifle
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: Making bots shoot through walls

Post by Vilespring »

Exactly. I have learned to make something kinda do what you want it to do, due to a limitation.
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"
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Making bots shoot through walls

Post by Apache Thunder »

Bots ignore PCOs with no AI templates. Thus they are invisible to them. My animated doors are PCOs on map I'm working on and the bots ignore them and try to drive through them (which is intended since this is what activates the door to open and let them through). I hadn't thought of that possibility in my initial reply. :P

I assume once the shields are PCOs I don't think you need to put any bot into it or anything. If there's someone/vehicle inside then they'll shoot at them. However if you want the bots to shoot at the shield it self, then you'd need to add an AI template and force a bot into the shield PCO so they have something they consider important enough to shoot at.
ImageImageImage
I have cameras in your head!
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Making bots shoot through walls

Post by BotHunter »

That hilarious! Right after you posted your first post, I gave the No-Ai thing a test! I was just Waiting to see if it was working. :)
Walk quietly and carry a sniper rifle
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Making bots shoot through walls

Post by Swaffy »

Hmm. Will they not see the shield if it is made a StaticObject and the 3D model has no collision mesh (only a visual mesh)?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
BotHunter
Posts: 480
Joined: Thu Jan 10, 2013 11:22 pm
Contact:

Re: Making bots shoot through walls

Post by BotHunter »

But then the shield will be useless :roll: :)
Walk quietly and carry a sniper rifle
Post Reply