Solarus quests
1.6
Quest maker's reference
|
A path finding movement is a particular path movement where the path is calculated to reach a target. The target is a map entity (by default the hero). The movement calculates repeatedly the shortest path towards the target entity, taking into account obstacles of the map. With this type of movement, an entity is capable of finding its way in a maze.
Path finding movements are particular movement objects. Therefore, they inherit all methods from the type movement.
See Methods of all movement types to know these methods.
The following methods are specific to path finding movements.
Sets the target entity of this movement.
entity
(entity): The entity to target.Returns the speed of this movement.
Sets the speed of this movement.
speed
(number): The new speed in pixels per second.Returns the angle of the current trajectory in radians.
East is 0
, North is math.pi / 2
, West is math.pi
, South is 3 * math.pi / 2
.
Path finding movements are particular movement objects. Therefore, they inherit all events from the type movement.
See Events of all movement types to know these events.