• npc's in mapping
    8 replies, posted
Hello, before I tell you my problem let me tell you what I am trying to do. I have a ZombieRP server that uses the DarkRP mod. I use the map zombiesurvival_b5. This map has gotten boring so I decided to try a crack at source sdk. I think I have the basics at hammer down pretty well so I decided to make npcs. I read some tutorials and was able to make respawning npcs but the problem is that they don't move unless the player goes near them. In zombiesurvival_b5 they wander around and follow players if they see them, but they just don't budge for me. Plus, in zombiesurvival_b5 they keep on coming and coming to the humans once they're disturbed. Before you can get what I'm saying you might have to try out the map, if you already have, then can you please tell me how to do this. I'm really stuck. =(
Did you put put nodes on the map?
The info_nodes? Ya I put them in a radius around the zombie spawn that would be equal to half the map. So I go up to the zombie, hit him with my crowbar then start running away... He chased me just like before then stopped. Also, when they spawn they didn't wander. =(
I think you may need AI_Goal entities or something, something that lures the NPC to the player. But as for me, i'm trying to figure out AI too, i want the combine to keep their bullets to themselves for the beginning scenes of my mod, but they just kill the player and the prisoner NPCs before the camera even gets started!
You can't just scatter info_nodes around. You have to kind of build a path out of them. Using the ai_show_connect command while in-game will give you an idea of how your nodegraph is assembled.
[QUOTE=Tanner;23676905]You can't just scatter info_nodes around. You have to kind of build a path out of them. Using the ai_show_connect command while in-game will give you an idea of how your nodegraph is assembled.[/QUOTE] Well it's going to be an rp map and I want the zombies to move everywhere. Play darkrp on zombiesurvival_b5 and you'll understand what I'm talking about. [editline]03:44PM[/editline] [QUOTE=lolnubs;23676327]I think you may need AI_Goal entities or something, something that lures the NPC to the player. But as for me, i'm trying to figure out AI too, i want the combine to keep their bullets to themselves for the beginning scenes of my mod, but they just kill the player and the prisoner NPCs before the camera even gets started![/QUOTE] Did you try using a script? [url]http://www.youtube.com/watch?v=BehhSMUwzqc&feature=related[/url] is a good tutorial with triggers and you might be able to fix your problem with this. I'm not sure though, but I was able to make a trigger that made combines rapell down. [editline]05:17PM[/editline] Bump. [editline]05:41PM[/editline] OK. I got them to move and wander around from there original spot, but once they lose sight of the player they stop following them. I made them move with one path_corner and it got them off of the spawn and to move around, but they still aren't following players. Did I mention I got rid of the info_nodes? What exactly do they do anyways?
[QUOTE=RazorSR;23684231] OK. I got them to move and wander around from there original spot, but once they lose sight of the player they stop following them. I made them move with one path_corner and it got them off of the spawn and to move around, but they still aren't following players. Did I mention I got rid of the info_nodes? What exactly do they do anyways?[/QUOTE] Without nodes, npcs are pretty useless. [QUOTE=MrClean]Nodes are pretty much guidelines for the npcs to follow set on a map. It allows them to follow players and know good places to take cover. Hint nodes are used to specify a specific activity for an npc to do on arrival at that node (such as jumping down ledges, where birds should fly when startled and good places to crouch). If a ground node is placed above the brush, it will fall back down onto the ground when the map is loaded.[/QUOTE] Think of nodes as path_corners that all connect to each other. When the player leaves the area the npc follows the path set for it using the nodes as a guideline. If you map involves using npcs, nodes are always necessary. [editline]07:30PM[/editline] To make the npcs wander, make them do an [URL="http://developer.valvesoftware.com/wiki/Assault"]assault[/URL]. Add assault points to make the npcs go where you want them too. [editline]07:39PM[/editline] [QUOTE=lolnubs;23676327]I think you may need AI_Goal entities or something, something that lures the NPC to the player. But as for me, i'm trying to figure out AI too, i want the combine to keep their bullets to themselves for the beginning scenes of my mod, but they just kill the player and the prisoner NPCs before the camera even gets started![/QUOTE] Use [URL="http://developer.valvesoftware.com/wiki/Ai_relationship"]ai_relationship[/URL]. Set the subject to <combine_name> and the target to !player. Make the disposition "like" and set the rank to 200. Make it start active and fire an output to disable when needed. For the prisoners, do the same but with <citizen_name> instead of !player and set "reciprocal" to yes. You can also make the subjects and targets class names (npc_combine_s, npc_citizen etc.).
[QUOTE=MrClean;23688659]Use [URL="http://developer.valvesoftware.com/wiki/Ai_relationship"]ai_relationship[/URL]. Set the subject to <combine_name> and the target to !player. Make the disposition "like" and set the rank to 200. Make it start active and fire an output to disable when needed. For the prisoners, do the same but with <citizen_name> instead of !player and set "reciprocal" to yes. You can also make the subjects and targets class names (npc_combine_s, npc_citizen etc.).[/QUOTE] Ah, thanks! [editline]04:08AM[/editline] [QUOTE=RazorSR;23684231]OK. I got them to move and wander around from there original spot, but once they lose sight of the player they stop following them. I made them move with one path_corner and it got them off of the spawn and to move around, but they still aren't following players. Did I mention I got rid of the info_nodes? What exactly do they do anyways?[/QUOTE] Like MrClean said, NPCs don't work without nodes, they'll just come straight for you until they lose sight. With nodes, they will actually vary their tactics according to their locale, and if they come under attack, they seek cover behind a wall. If you run, they should follow. [editline]04:08AM[/editline] Wait, do you have any info_node_hint around? If not, then you should consider setting some up. They are a little more complicated than info_nodes, in the effect that you can set what environment the info_node_hint "hints" to NPCs around it (Like the chokepoint of a doorway, or an area without cover etc.).
[QUOTE=lolnubs;23676327]I think you may need AI_Goal entities or something, something that lures the NPC to the player. But as for me, i'm trying to figure out AI too, i want the combine to keep their bullets to themselves for the beginning scenes of my mod, but they just kill the player and the prisoner NPCs before the camera even gets started![/QUOTE] AI Relationship entities. And you can set an env_global to Gordons 'pre-criminal' status, so the Combine shouldn't attack you. Ah, ninja'd.
Sorry, you need to Log In to post a reply to this thread.