AI patrolling/waves

AI patrolling/waves

Re: AI patrolling/waves Posted by Sylink on Sat Sep 17th 2005 at 12:41am
Sylink
2 posts
Posted 2005-09-17 12:41am
Sylink
member
2 posts 0 snarkmarks Registered: Sep 17th 2005
I have made a map involing infinite waves of enemies, I am using the
npc_template_maker to spawn units in a given radius. Once they
spawn they tend to mill around until I get in site. I can use the
template and make them go to one path_corner after spawning but it
doesn't always work. I want the npcs to rove the map and search
for the player. Is there an easy way to do this?

I check the assault tutorial that is on here and that isnt what I want
since the npcs aren't pre created and are spawned continously on the
fly.

How do I know if the AI are using the info_nodes,? Will any npc
automatically use them ? I have some but I never the AI go to the
farther ones.
Re: AI patrolling/waves Posted by Crono on Sat Sep 17th 2005 at 2:07am
Crono
6628 posts
Posted 2005-09-17 2:07am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
They automatically use them. All they do is tell the NPC if they can hide or how to make their way to another path.

I don't know if there's a find player option, but I would imagine so, since it happens in HL2 at times. Something you could try to do is spawn the NPCs closer to the player?

Just some ideas. I don't know the specifics though, since I've never used any NPC stuff.
Blame it on Microsoft, God does.
Re: AI patrolling/waves Posted by Dark_Kilauea on Sat Sep 17th 2005 at 6:15am
Dark_Kilauea
629 posts
Posted 2005-09-17 6:15am
629 posts 123 snarkmarks Registered: Apr 15th 2005 Occupation: Fast Food Location: USA
Perhaps you should tell them to assault, there is a tutorial on this site I believe.
Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/
Re: AI patrolling/waves Posted by Sylink on Sat Sep 17th 2005 at 8:31am
Sylink
2 posts
Posted 2005-09-17 8:31am
Sylink
member
2 posts 0 snarkmarks Registered: Sep 17th 2005
Yes, I want a find player type option, but really I just want them to rove around the map.

Assault won't work because you have to have the npcs pre placed and I
am simply having them spawn randomly and continously.
Re: AI patrolling/waves Posted by MeanDroneFrog on Sat Sep 17th 2005 at 8:38am
MeanDroneFrog
18 posts
Posted 2005-09-17 8:38am
18 posts 2 snarkmarks Registered: Jan 12th 2005 Location: UK
You need to set up an aiscripted_schedule entity, there is an example here for manhacks but the principle is the same.

http://www.halfwit-2.com/?page=tutorial&action=view&item=13

briefly

set 'target npc' to the npc's that you want to attack the player

set 'ai state' to alert

set 'schedule to run' set enemy to goal entity and run to goal entity

'goal entity' set to !player

check the 'repeatable' flag

sprinkle info_nodes liberally between spawn point or path corner and the player.

You may have to give your spawned npc's a child name and set the aiscripted_schedule 'target npc' to that
Frodo Greenman
www.halfwit-2.com