VERC: Putting Monsters On Paths Last edited 21 years ago2003-02-13 20:10:00 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.

This article was recovered from an archive and needs to be reviewed

  1. The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted
  2. Some information may be out of date as it was written before Half-Life was available on Steam
  3. After the article is re-formatted and updated for Steam HL, remove this notice
  4. Please do not remove the archive notice from the bottom of the article.
  5. Some archive articles are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.

Introduction

This article demonstrates how to make a monster follow a path until it's AI kicks in (usually when it sees a player). This effect can be used to give a level a more dynamic feel and better replayability -- monsters won't always be in the same spot. This method is perfect for making patrolling groups of soldiers and other nasties.

Setup

The setup for this method is quite simple. Create a path of path_corners. In the example map the path_corners form a continuous loop (see picture below). Now, create a monster. In this example, we've used a monster_barney security guard. In his properties, set the Target value to the name of the first path_corner.
monsterpath.gifmonsterpath.gif
Hey -- that's pretty much all there is to it!

The example map is laid out so that the barney follows his path around a square set of corridors. You are in an area above him, but the floor is transparent so you can follow his movements.

The monster will follow the path until it's AI kicks in. In this case, if Barney were to see you, he'd stop following the path and greet you. If we'd used a soldier instead, upon seeing the player he'd start shooting. You can test these situations out by noclipping (Link: popup.php?id=noclipping')) through the floor of the example map and letting the monster see you.

If you want the monster to do something in particular when his AI kicks in and he stops following the path, set the Trigger Condition and Trigger Target properties of the monster. More information on these can be found in the Common Monster Properties (Link: index.php?doc=1015286847-70888800) article.

Grr! Argh! Bug!

Due to a bug, the method described here will not work properly if a game is saved and reloaded. The NPCs state is not saved properly. Upon reloading the saved game, the NPC will just stand where he is and will not continue to follow the path. This tutorial will be expanded at a later date with different solutions to this problem.

Resources

Below is a list of entities related to this tutorial. For a more concrete illustration, check out the example map linked below.
This article was originally published on the Valve Editing Resource Collective (VERC).
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

You must log in to post a comment. You can login or register a new account.