Skip to content

HScript Functions and Variables

Mayo78 edited this page Feb 9, 2023 · 2 revisions

Functions

setVar(variable:String, value:Dynamic)/getVar(variable:String)/removeVar(variable:String)

shortcuts to accessing game.variables

runLuaCode(code:String)

runs lua code (only for standalone hscripts!)

Note

Every single lua function from funkinlua is included with every hscript instance

Variables

Various flixel libraries are included in each hscript instance, to see this list, check source/HScript.hx

game: the current state's instance

luaInstance: if ran from runHaxeCode, this will be the FunkinLua instance that ran the haxe code

this: the current HScript instance (not the instance of the code, kinda confusing but whatever)

Function_Stop: same as lua's function_stop

Function_Continue: same as lua's function_continue