AI and other questions

W

Wiz

Guest
Hi,

I've been playing around with AI and NPCs lately, but I can't seem to make any results. I looked at a few tutorial videos but even by repeating the same steps, I don't get the right results.
Therefore, I'd like to ask those of you who have had some previous experience with NPCs/AI to help me out with a couple of pointers.

First, I can't find a decent and broad text or video guide for NPC making and customizing. It would be nice to have some kind of big reference with example of how to create and make an NPC active and smart :)

Second, for my mod, I'm planning to create an RTS player system similar to that of Natural Selection. For example, I'd like the RTS player to be able to spawn NPCs by placing them on the map. Is that even feasible? I think it would require some kind of very advanced script that would spawn the model and its behavior objects all at the same time, and that could be hardcore to code.

Thank you, I'd really appreciate answers to these issues.
 
Garry's Mod can spawn NPCs on the fly.
You can also use the command "npc_create npc_name" (were "name" equals the type of NPC to spawn, for example "npc_create npc_alyx")
As for the NPC's A.I., Place nodes around your map to help the NPC navigate to all locations of it.
Look around at the diffrent types of nodes and hints that can be used to let the NPC know it can do that.
 
Wiz said:
Hi,

I've been playing around with AI and NPCs lately, but I can't seem to make any results. I looked at a few tutorial videos but even by repeating the same steps, I don't get the right results.
Therefore, I'd like to ask those of you who have had some previous experience with NPCs/AI to help me out with a couple of pointers.

First, I can't find a decent and broad text or video guide for NPC making and customizing. It would be nice to have some kind of big reference with example of how to create and make an NPC active and smart :)

Second, for my mod, I'm planning to create an RTS player system similar to that of Natural Selection. For example, I'd like the RTS player to be able to spawn NPCs by placing them on the map. Is that even feasible? I think it would require some kind of very advanced script that would spawn the model and its behavior objects all at the same time, and that could be hardcore to code.

Thank you, I'd really appreciate answers to these issues.

Easily done through code - I've managed to make my own RTS (still pending release) through it. HL2 generally already makes the NPCs smart - it's making them follow your commands that's difficult.

For spawning of NPCs on the fly, look at how the NPCMaker entity works.

-Angry Lawyer
 
if its a comand and conquer type game then say at the barracks you could have the npc maker at the front of it and then in your code maybe on a gui you go to barracks and select buy solider then get that to trigger the npc maker?
 
I'm trying to have something like Dungeon Keeper, where you can place monsters where the mouse cursor is. Well in DK you had to drag them, but the idea is similar.
 
Creating monsters is pretty simple. Removing them is simple. Storing them is simple-ish, although you need to be pretty good with arrays. Making Source register the mouse in an RTS style... now that's the tough bit.

-Angry Lawyer
 
Back
Top