User Tools

Site Tools


replace_navigation

Replace Navigation


Replaces one navigation type with another for any navigation paths that are connected to the specified tile or object. The acceptable values for navigation type are listed and explained on the Navigation and Interaction page.

Signature:

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.Navigation TypeYes
new_navigation_typeNew navigation type to replace the existing type with.Navigation TypeYes

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 (now allowing characters to pass through).

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.txt · Last modified: 2018/03/16 09:47 by justin