Psych Engine Logo
Psych Engine - Lua Script API

Precache Functions

Functions to precache files, preventing stutters.


precacheImage

precacheImage(file:String, ?allowGPU:Bool = true):Void

Precaches a file in "images/" folder.

Examples:


precacheSound

precacheSound(file:String):Void

Precaches a file in "sounds/" folder.

Examples:


precacheMusic

precacheMusic(file:String):Void

Precaches a file in "music/" folder.

Examples:


addCharacterToList

addCharacterToList(name:String, type:String):Void

Precaches a character, best used in conjunction with "triggerEvent" of "Change Character" to allow you to change characters through a Lua Script for custom mechanics.

Examples: