Game (functions)/Camera & Scene Control
From PMDOWiki
GAME:FadeOut
Fade out the screen. Waits to complete before continuing.
Arguments
white: Fade to white if set to true. Fades to black otherwise.duration: The amount of time to fade in frames.
Example
GAME:FadeOut(false, 60)
GAME:FadeIn
Fade into the screen. Waits to complete before continuing.
Arguments
duration: The amount of time to fade in frames.
Example
GAME:FadeIn(60)
GAME:MoveCamera
Centers the camera on a position.
Arguments
x: X coordinate of the camera centery: Y coordinate of the camera centerduration: The amount of time it takes ot move to the destinationtoPlayer: Destination is in absolute coordinates if false, and relative to the player character if set to true.
Example
GAME:MoveCamera(200, 240, 60, false)
GAME:MoveCameraToChara
Centers the camera on a character.
As we are simply moving the camera to a character, this will simply set ViewCenter and not ViewOffset.
Arguments
x: X coordinate of the camera center, as an offset for the charay: Y coordinate of the camera center, as an offset for the charaduration: The amount of time it takes ot move to the destinationchara: The character to center on.
Example
GAME:MoveCameraToChara(200, 240, 60, false)
GAME:GetCameraCenter
Gets the current center of the camera.
Returns
A Loc object representing the center of the camera.
GAME:IsCameraOnChar
Determines whether the camera is centered relative to the player.
Returns
Returns true if the camera is relative to the player, false otherwise.
