path_corner Last edited 2 weeks ago2024-11-06 14:25:44 UTC

Redirected from path_corner_(Half-Life)

path_corner - Point Entity

A path_corner entity is used to compose a path. In its simplest form, a path_corner has a name and a Next stop target value that points to the next path_corner in the path. The path may either be open (with a start and an end) or looped (last entity points back to the first).

Use the Path Tool in Hammer Editor/J.A.C.K. to quickly set up a path of path_corners.

As a rule of thumb, the path_corner has barely any logic. Instead, all the logic of following the path, waiting, firing the targets, etc., are handled by entities making use of path_corners. These are:
  1. Apaches (monster_apache) use it as its flight path. The angles are used to aim the craft in flight.
  2. Ospreys (monster_osprey) also use it as its flight path. The angles are used to aim the craft in flight, and speed keyvalue dictates which path is for flying by and which is for dropping grunts.
  3. some monsters use it as its patrol path. The monsters must not be named.
  4. Cameras (trigger_camera) can use Fire on Pass, Wait, and New train speed.
  5. Gun targets (func_guntarget) can use Fire on Pass and Wait.
  6. Trains (func_train) can use Fire on Pass, Wait, and New train speed, as well as all the flags.
The func_tracktrain is not on the list for it uses the path_track instead.
Not all keyvalues defined in the FGD for this entity are used by all entities that do use path_corner. Due to the sheer number of implementations, the attributes and flags sections below each has a table in lieu of a list, each with columns for each of the six implementations. ✔️ means support, ❌ means no support.

Attributes

Name Keyvalue name Description Ap Os Mo Ca GT Tr
Name targetname Property used to identify entities. ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Pitch Yaw Roll angles Sets angles. The compass in Hammer/J.A.C.K. corresponds to Yaw. Used to aim Apaches/Ospreys in flight. ✔️ ✔️
Next stop target target Name of the next path_corner in the path. ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Fire On Pass message Trigger this event when this path_corner is passed by an entity using the path. ✔️ ✔️ ✔️
Wait here wait Makes the entity wait for this number of seconds before moving to next path_corner. ✔️ ✔️ ✔️
New train speed speed Set new speed for the entity once it passes this path_corner. ✔️ ✔️ ✔️

Flags

Name Value Description Ap Os Mo Ca GT Tr
Wait for retrigger 1 Entity will wait and will only continue when triggered. ✔️
Teleport 2 Makes entity teleport to this path_corner. ✔️
Fire once 4 The entity will only fire the path's "Fire On Pass" target once. ✔️ ✔️ ✔️

Notes

6 Comments

Commented 15 years ago2009-06-09 00:07:41 UTC Comment #101117
weird bug i had once regarding path corners. I grouped 4 pathcorners together, and somehow the fire on pass value i had for only 1 out of 4 paths, was copy/pasted to all 4 path_corners!

afaik, it's only happened once, but something to keep in mind if you're having trouble with path corners.
Commented 11 years ago2013-03-31 19:01:13 UTC Comment #101118
better use func_tracktrain it doesn't need any corners
Commented 2 years ago2022-04-01 12:04:54 UTC Comment #104293
New train rot. Speed (yaw_speed) was listed as an attribute but that doesn't seem to be implemented, so I removed it
Commented 2 years ago2022-07-09 18:58:44 UTC Comment #104631
does func_traintrack supports path_corner or its only path_tracks that makes it moves
Commented 2 years ago2022-07-09 19:24:34 UTC Comment #104632
C0JJ, func_tracktrain uses path_track only. I have updated the article to clarify
Commented 8 months ago2024-02-29 00:09:02 UTC Comment #106019
Fun fact: the logic of picking movement waypoints of a func_train is entirely within func_train itself. It is therefore possible to make a valid path with other entities mixed in. I've successfully mixed path_corner's with momentary_doors like this:
path_corner (`p1`)
  • target = m1
  • wait = 0
  • spawnflags = Teleport (2)
momentary_door (`m1`)
  • target = p2
  • wait = 0
path_corner (`p2`)
  • target = m2
  • wait = 0
  • spawnflags = Teleport (2)
momentary_door (`m2`)
  • target = p1
  • wait = 0
I can then use momentary_rot_button to move the momentary_door's around and vary the distance the func_train has to travel.

It is a setup for an experiment where I can vary the time a func_train spends on one part of the map vs the other because it's being used to occlude LOS between me and a monster to test its AI schedule but that's off topic.

But you can likewise use it to have dynamically timed sequence with the mom_doors and func_train's off the playable areas.
My theory is that func_train's check the keyvalues of the entities it uses as paths (usually path_corner's) without checking that their classname is actually path_corner. You can therefore use any entity as long as it has keyvalues that concur with that of path_corner's: a target, optionally a wait, message (fire on pass) or speed, and spawnflags that don't conflict with that of a path_corner (therefore flag 1 will stop the func_train, flag 2 will teleport, etc.)
[2024-09-22] Most monsters use "target" to patrol `path_corner`s. Should denote all attributes on whether they apply to [Apaches/Ospreys/Monsters/Trains].
[2024-09-23]
List of monsters that patrols path_corners in their target kvs: Need to update the target attribute in their pages. For all others, also need to update that target does nothing.
[2024-10-07]
  • tidied up formatting for this comment for some reason.
  • Added trigger_camera and func_guntarget to page
  • Changed lists to tables on account of there being like 6 different use cases for this entity now

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