Psych Engine Logo
Psych Engine - Lua Script API

Camera Functions

Functions to change camera points and apply effects.


setCameraScroll

setCameraScroll(x:Float, y:Float):Void

Set the Game Camera's current scroll position.

Examples:


setCameraFollowPoint

setCameraFollowPoint(x:Float, y:Float):Void

Set the Game Camera's follow point position.

Examples:


addCameraScroll

addCameraScroll(?x:Float = 0, ?y:Float = 0):Void

Adds X/Y to the Game Camera's current scroll position.
All values are optional and defaults to zero.

Examples:


addCameraFollowPoint

addCameraFollowPoint(?x:Float = 0, ?y:Float = 0):Void

Adds X/Y to the Game Camera's follow point position.
All values are optional and defaults to zero.

Examples:


getCameraScrollX

Usage: getCameraScrollX()

Returns Game Camera's current scroll X, float value.


getCameraScrollY

Usage: getCameraScrollY()

Returns Game Camera's current scroll Y, float value.


getCameraFollowX

Usage: getCameraFollowX()

Returns Game Camera's follow point X, float value.


getCameraFollowY

Usage: getCameraFollowY()

Returns Game Camera's follow point Y, float value.


cameraSetTarget

cameraSetTarget(character:String):Void

Changes the Follow Point to target a character.

Examples:


cameraShake

cameraShake(camera:String, intensity:Float, duration:Float):Void

Shakes an identified camera.

Examples:


cameraFlash

cameraFlash(camera:String, color:String, duration:Float, forceReset:Bool):Void

Flashes an identified camera.

Examples:


cameraFade

cameraFade(camera:String, color:String, duration:Float, forceReset:Bool, ?fadeOut:Bool = false):Void

Flashes an identified camera.

Examples: