CameraTarget

┗> Event > Object > Class


A region in the Overworld that causes the camera to target a specific position while the player is inside.
CameraTarget is an Event - naming an object cameratarget on an objects layer in a map creates this object.
See this object's Fields for the configurable properties on this object.


Constructor


CameraTarget(x: number, y: number, shape: number, properties: number)

Arguments:

x: number
y: number
shape: number
properties: number




Methods


CameraTarget:getTargetPosition()

Gets the target position of the camera whilst inside this region.
Priority is Marker > target position properties > center of object

Returns:

x: number
y: number


CameraTarget:onEnter(chara: Player)

Arguments:

chara: Player

The character controlled by the player when in the Overworld.



CameraTarget:onExit(chara: Player)

Arguments:

chara: Player

The character controlled by the player when in the Overworld.




Fields



CameraTarget.lock_x: boolean

[Property lockx] Whether the camera's x position will be locked (Defaults to true)


CameraTarget.lock_y: boolean

[Property locky] Whether the camera's y position will be locked (Defaults to true)


CameraTarget.return_speed: number

[Property returnspeed] The speed at which the camera will return to its original target


CameraTarget.return_time: number

[Property returntime] The time, in seconds, that the camera will take to return to its original target



CameraTarget.speed: number

[Property speed] The speed at which the camera will move to its target position


CameraTarget.target_marker: string

[Property marker] The marker that the camera will center on


CameraTarget.target_x: number

[Property x] The x-coordinate that the camera will center on


CameraTarget.target_y: number

[Property y] The y-coordinate that the camera will center on


CameraTarget.time: number

[Property time] The time, in seconds, that the camera will take to move to its target position