path_waypoint

Modified

12-Jul-2023

Path_waypoint is a waypointing entity, mostly works correctly but suffers from few minor bugs. Need to be tested, keep in mind that some keyvalues might not work properly. The most important feature of this entity is that monster following it would always finish his route, even when blocked, attacked, disturbed, after overriding his AI or revived. Use entity by specifying name of first path_waypoint in the monster/squadmaker/monstermaker "Path Name" keyvalue.

Keyvalues


OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.

Name targetname : Set name of path_waypoint so other entities can trigger it.

Next Path_waypoint target : Name of the next path_waypoint to go after entity reach this path_waypoint.

Alternate Next Path_waypoint alternate_target : Alternate Waypoint to use.

Move to Position movementtype : How monster will move to this waypoint.

  • 0 : Walk
  • 1 : Run
  • 2 : Teleport
  • 3 : Turn to Face
  • 4 : Don't Move

Move within Radius radius : When in radius, monster has finished moving to the waypoint. Only works for Walk / Run.

Face Waypoint Direction useangles : If set to yes, monster's YAW will change gradually to match the path_waypoint's YAW

  • 0 : No (default)
  • 1 : Yes

Trigger on Arrival trigger_on_arrival : Entity to trigger whenever monster arrives here.

Arrival Animation arrival_animation : Animation to play on arrival.

Trigger after Arrival Animation trigger_after_arrival : Entity to trigger upon completing the arrival animation. If no arrival animation, trigger after Trigger on Arrival is triggered.

Wait Activity wait_activity : Controls monster behaviour when waiting at this path_waypoint.

  • 0 : Play Wait Animation (default) : Play wait animation specified in "Wait Animation".
  • 1 : Look around : Stay in place, look around.
  • 2 : Investigate Area : Wal around close area.
  • 3 : Use AI : Let the monster AI take over while waiting.

Wait Animation wait_animation : Animation to play when waiting at this waypoint. (Looped) If animation is blank, the monster will stand in place. If wait time is zero, this is not used.

Wait Time wait_time : After the position is reached, the monster must wait this long before moving to the next waypoint, and before any targets are triggered.

Wait Master wait_master : Name of the Multisource entity. Monsters will wait here until multisource is activated.

Wait Here Until Full waituntilfull : Force monsters to wait until this waypoint is full before proceeding to the next waypoint. If Maximum Occupants is 0, a level error message will occur.

  • 0 : No (default)
  • 1 : Yes

Departure Animation departure_animation : Animation to play before leaving waypoint. "Target On Departure" is triggered after animation completes if animation is present.

Trigger on Departure trigger_on_departure : Target to trigger when monster finishes the Departure Animation. If no Departure Animation, trigger immediately after waiting.

Occupant Radius occupant_radius_check : If an monster is within the radius of this path_waypoint, it takes up an occupant slot.

Maximum # Occupants occupant_limit : This point only accepts this number of monsters at a time.

Overflow Waypoint overflow_waypoint : If this waypoint is full, monsters will go to the specified waypoint instead. If the provided overflow point is removed or not available, monster will remain at the previous waypoint or position until room is available.

Force Waypoint Completion force_complete : Forces monster to finish this particular path_waypoint even if a higher priority path is found, provided that the stop conditions are not met. This disables path_condition / path_condition_controller evaluation during the extent of the trip and departure.

  • 0 : No (default)
  • 1 : Yes

Trigger on Stop Condition stop_trigger : If this path_waypoint releases monster because of a stop condition, (e.g. a new enemy appears) something can be triggered.

Delay before Return restart_delay : If monster has stopped moving because of a stop condition (E.g. hearing a gunshot), the NPC will wait this long before continuing back to this path_waypoint.

When 'Wait Animation' is not specified, and wait activity is set to 'Play Wait Animation', monster will be playing it's last movement animation during wait time.

Monsters can be easily interrupted by blocking their way, interacting with them e.t.c. they will finish their route after dealing with interruptions, but there is also possibility that they will start whole path from beginning instead of continuing from last node.

When next waypoint is overflowed by 'Maximum # Occupant' monster that are waiting for free slot have problems with their animations.

Multiple monsters proceeding nodes with 'Maximum # Occupant' and animation set (e.g. 'Departure Animation') may cause issues with monster walking animation.