User Tools

Site Tools


replace_navigation

This is an old revision of the document!


Replace Navigation


Replaces one navigation/interaction type with another for any navigation paths that are connected to the specified tile or object. The acceptable values for navigation type are described below:

  • WALK_AND_INTERACT: Characters can both walk and interact between the tiles.
  • WALK_ONLY: Characters can only walk between the tiles (no interaction is allowed).
  • INTERACT_ONLY: Characters can only interact between the tiles (no walking is allowed).
  • PENDING: Characters cannot walk or interact between the tiles, but a connection is maintained. (This is in support of some future functionality.)
  • NONE: Characters cannot walk or interact between the tiles.
replace_navigation(entity, navigation_type, new_navigation_type)
ArgumentDescriptionTypeRequired
entityTile or object to replace navigation to/from.EntityYes
navigation_typeExisting navigation type that will be replaced.ConstantYes
new_navigation_typeNew navigation type to replace the existing type with.ConstantYes

See Modify Navigation if you'd like to only change the navigation type between two specific tiles instead of any tiles relative to an entity.

Example:

replace_navigation(self, INTERACT_ONLY, WALK_AND_INTERACT)

Results: Any navigation paths in each of the four cardinal directions from the entity that this script is attached to that currently have a type of INTERACT_ONLY will be changed to WALK_AND_INTERACT.

Use the Replace Navigation function to easily update the navigation for any tiles surrounding an obstacle that has been removed or a door that has been opened to enable characters to pass through.


Editor Node:

Visual Demo:

replace_navigation.1497209816.txt.gz · Last modified: 2017/06/11 12:36 by justin