Pick up the crowbar of research scientist Gordon Freeman, who finds himself on an alien-infested Earth being picked to the bone, its resources depleted, its populace dwindling. Freeman is thrust into the unenviable role of rescuing the world from the wrong he unleashed back at Black Mesa. And a lot of people, people he cares about, are counting on him.

Post tutorial Report RSS Adding an Npc_Crow

This tutorial shows you how to make a crow fly around using path_corners.

Posted by on - Basic Mapping/Technical

[page=Introduction]

I noticed that this tutorial was not here on the site so I figured I would add it. The fact is it is very easy to do but most people don't know how. Hopefully this tutorial will help.

Tutorial Image

[page=Entity NPC_Crow]
1. Click on your entity tool and from the drop down menu select the entity npc_crow. Place it anywhere in your map.

2. Double click the npc_crow to open its object properties. Go to "flags" and take a look at the values you can play with to make your crow do whatever you want.

I usually select the "efficient" flag - this stops it from getting close to the players and then flying off. But you do whatever you want. I usually also select the fade corpse flag.

[page=Entity Path Corners]
1. Now we need to tell it where to fly. To do this you create path_corner entities around the map. I only use two because for me the crow is just something fun to shoot at. You can use however many you want. Especially if you like to see the crow swoop around. Make the path_corner the same height as the crow. Ope the properties tag for the path_corner and name it "npc_crowpath_1". Now you can click on your npc_crowpath_1 and hold down the SHIFT button - drag npc_crowpath_1 out and it automaticly creates npc_crowpath_2.

2. Now, go to npc_crowpath_2 entity and open it properties. For next stop target put npc_crowpath_1. This makes it so when the crow gets to the second path - it turns around and comes back to the first.

3. Now open the properties for your npc_crow and put in the first stop target "npc_crowpath_1"

That's it, load the map and you will see your crow.

[page=Using env_entity_maker and point_template]
1. If you want your crow to return after it is killed you have to use the env_entity_maker and point_template.

The env_entity_maker is used to spawn any entity. NPC's, physics objects, and items the players can pick up can be spawned at the location of the env_entity_maker when it is fired.

Add an env_entity_maker to your map and name it npc_crow_spawner

Tutorial Image

Under the key_value set the point template to spawn to "npc_crow_template" - you have not made this entity yet.

Tutorial Image

Under flags set to autospawn: wait for entity destruction.

2. Add a point_template to your map and open its properties tag. Name the entity "npc_crow_template"

Tutorial Image

Under the first key value set the Template 1 to "npc_crow"

Tutorial Image

3. Double click the properties tag for the npc_crow and open the Outputs tab. Add the following output

Myoutput: OnDeath
TargetEntity: npc_crow_spawner
TargetInput: Forcespawn

Tutorial Image

[page=Using logic_timer and logic_auto]
1. It is important to note, now that the npc_crow is set to use an env_entity_maker it will not appear in your map when you run it. You now have to force it spawn the very first time. Your settings in the point_template make it respawn once it dies.

This is where the logic_timer to come into play. I will show you how to set it up to make the crow spawn randomly that way players dont sit and shoot the crow over and over again.

But first and foremost add a logic_auto to the map. Set the following in the outputs tab.
Myoutput: OnMapSpawn
TargetEntity: npc_crow_spawner
TargetInput: Forcespawn

You just added the crow to the map when someone joins the map for the first time.

Add a logic timer to your map and set the following key values:

Use Random Time: Yes
Minimal Time: 1
Maximum: 15

Tutorial Image

Under Outputs set the following:

Myoutput: OnTimer
TargetEntity: npc_crow_spawner
TargetInput: Forcespawn

Tutorial Image

[page=Conclusion]

Hopefully you werent too overwhelmed by the entity makers. As I said in the tutorial you dont have to do any of that unless you want to crow to keep coming back. You also dont have to use a random timer.

Using this tutorial you can replace the npc_crow with the npc_pigeon, and npc_seagull.

Post comment Comments
HaloStrike
HaloStrike - - 942 comments

Now all thouse damn mods will not have an excuse for featuring these cute critters!

Reply Good karma Bad karma+2 votes
Torabi
Torabi - - 376 comments

Nice tutorial and easy to understand! thanks a lot! :)

Reply Good karma Bad karma+1 vote
ethaninja
ethaninja - - 5 comments

Thanks man, now I can add a bit of life to my first map :)

Reply Good karma Bad karma+1 vote
bassetfilms
bassetfilms - - 96 comments

hey can you do a tutorial for making a person npc walk when triggered?

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: