Currently supported Path Entities: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Line 20: Line 20:
** 360 = East(X)
** 360 = East(X)
* '''path_wait''' waits, standing completely motionless at a given place for a given amount of time, then moves to next path_*
* '''path_wait''' waits, standing completely motionless at a given place for a given amount of time, then moves to next path_*
* '''path_sit''' AI will sit down, then optionally rotate toward the angle given by the ''sit_down_angle'' spawnarg
* '''path_sleep''' AI will lie down
* '''path_waitfortrigger''' AI waits at a given place until triggered, then moves to next path_*
* '''path_waitfortrigger''' AI waits at a given place until triggered, then moves to next path_*
* '''path_hide''' deactivates and stops rendering the AI
* '''path_hide''' deactivates and stops rendering the AI
Line 26: Line 28:


For more information, see the editor usage tab for each of these entities.
For more information, see the editor usage tab for each of these entities.
== Activating targets ==
A few path entities can be set up to activate targets (other than path entities).
* '''path_corner''' triggers targets when node is reached
* '''path_anim''' triggers targets when the animation is done
* '''path_turn''' triggers targets when turn is done
* '''path_wait''' triggers targets when wait is over
* '''path_sit''' triggers targets when sitting anim is done, including any final turn
* '''path_sleep''' triggers targets when lying down anim is done


== Not yet supported ==
== Not yet supported ==

Revision as of 19:07, 15 February 2014

Originally written by Ishtvan on http://forums.thedarkmod.com/topic/3006

For extended information on how to use these entities in your map, see Path Nodes.


Path entities (or path nodes) are how you set up AI patrols, AIs turning in place, AIs waiting at a particular point for a while before moving on, AIs randomly switching between two patrol routes, and all combinations of those things.

The following path_* entities should work, but have not been extensively tested:

Supported

  • path_corner AI will walk to this point (make sure this entity is on the ground and a place AI can get to).
  • path_anim plays an anim once when the AI gets to this point, then goes on to the next path entity when the anim is done playing
  • path_cycleanim stays in place and loops an anim, either for a specified amount of time or until triggered
  • path_lookat for the next wait seconds, turn head to look at the entity given by the focus spawnarg (defaults to looking at the path_lookat entity itself). Immediately keep moving to next path_* in sequence.
  • path_turn Turns in place to face a chosen direction. Give it the property angle from 0 to 360 with the direction you wish the player to be facing, eg, as follows in plan (top) view...
    • 0 = East (X) (default)
    • 90 = North (Y)
    • 180 = West (-X)
    • 270 = South (-Y)
    • 360 = East(X)
  • path_wait waits, standing completely motionless at a given place for a given amount of time, then moves to next path_*
  • path_sit AI will sit down, then optionally rotate toward the angle given by the sit_down_angle spawnarg
  • path_sleep AI will lie down
  • path_waitfortrigger AI waits at a given place until triggered, then moves to next path_*
  • path_hide deactivates and stops rendering the AI
  • path_show starts rendering the AI
  • path_interact This lets the AI interact with an entity (for example a button) in a similar way to frobbing. This will only work for buttons etc, but not for inventory items and moveables. The AI will stop and look at the entity while interacting, but not walk to it, so a path_corner next to the entity is required. Give it the spawnarg ent with the name of entity to be frobbed (plus target the next path entity if any.)

For more information, see the editor usage tab for each of these entities.

Activating targets

A few path entities can be set up to activate targets (other than path entities).

  • path_corner triggers targets when node is reached
  • path_anim triggers targets when the animation is done
  • path_turn triggers targets when turn is done
  • path_wait triggers targets when wait is over
  • path_sit triggers targets when sitting anim is done, including any final turn
  • path_sleep triggers targets when lying down anim is done

Not yet supported

  • path_attack
  • path_conversation_listen
  • path_conversation
  • path_headanim
  • path_talk
  • path_talk_triggered
  • path_talk_primary
  • path_talk_secondary
  • path_waitforheadanim
  • path_jump
  • path_default (not sure if this was even meant to be used)
  • path_sentry_* These only apply to D3 sentry robots, so there's no reason these should be on DarkMod AI. (Maybe we can use some them though if they're useful for certain AI behaviors, like telling characters when to lead the player and when to leave the player behind)

(See also Follow Me:AI Leads Player)