Solarus quests
1.6
Quest maker's reference
|
A circle movement makes a circular trajectory around a center point.
The center can either be some fixed coordinates or a possibly moving map entity.
Circle 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 circle movements.
Returns the center point of this movement.
Sets the center of this movement as a fixed point or a map entity.
To make circles around a fixed point:
x
(number): X coordinate of the center.y
(number): Y coordinate of the center.To make circles around a map entity (only during a game):
entity
(entity): The center entity.dx
(number, optional): X offset to add to the center entity's coordinates (default 0).dy
(number, optional): Y offset to add to the center entity's coordinates (default 0).Returns the radius of circles to make.
If circle_movement:get_radius_speed() is not 0, radius changes are made gradually.
Sets the radius of circles to make.
If circle_movement:get_radius_speed() is not 0, the radius will be updated gradually.
radius
(number): The new wanted radius in pixels.Returns the speed of radius changes.
Sets the radius to be updated immediately of gradually (at the specified speed) towards its wanted value.
radius_speed
(number): The speed of radius changes in pixels per second, or 0 to make radius changes immediate.Returns whether circles are made clockwise or counter-clockwise.
true
if circles are clockwise.Sets whether circles are made clockwise or counter-clockwise.
clockwise
(boolean, optional): true
to make circles clockwise. No value means true
.Returns the angle indicating the current position on the circle.
This is the angle of the vector between the center and the current position.
Sets the position on the circle as an angle from its center.
This is the angle of the vector between the center and the new position to set.
initial_angle
(number): The angle in radians.Returns the speed of the angle variation.
Sets the speed of the angle variation.
angular_speed
(number): The new angle speed in radians per second.Returns the maximum number of rotations of this movement.
When this number of rotations is reached, the movement stops.
0
means infinite).Sets the maximum number of rotations of this movement.
When this number of rotations is reached, the movement stops.
max_rotations
(number): The maximum number of rotations to make (0
means infinite).Returns the maximum duration of this movement.
When this delay is reached, the movement stops.
0
means infinite).Sets the maximum duration of this movement.
When this delay is reached, the movement stops.
duration
(number): The duration of the movement in milliseconds (0
means infinite).Returns the delay after which this movement restarts.
0
means no restart).Sets the delay after which this movement restarts.
loop_delay
(number): The restart delay in milliseconds (0
means no restart).Circle movements are particular movement objects. Therefore, they inherit all events from the type movement.
See Events of all movement types to know these events.
The following methods are deprecated and may be removed it future releases.
Returns the angle from where the first circle starts.
Use circle_movement:get_angle_from_center() instead.
Sets the angle from where the first circle should start.
initial_angle
(number): The initial angle in degrees.Use circle_movement:set_angle_from_center() instead.
Returns the speed of the angle variation.
Use circle_movement:get_angular_speed() instead.
Sets the speed of the angle variation.
angle_speed
(number): The new angle speed in degrees per second.Use circle_movement:set_angular_speed() instead.