From 315c5e007c517f7f48e5d9fb3cdbc3fd40433839 Mon Sep 17 00:00:00 2001 From: ItsLJcool Date: Wed, 23 Apr 2025 12:51:12 -0700 Subject: [PATCH] added `onScriptSetup` so now instead of using `onScriptCreated` in HScript, you can now use this function whent the script is actually initalized!!!! LETS FUCKING GO!!! (#618) --- source/funkin/backend/scripting/HScript.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/funkin/backend/scripting/HScript.hx b/source/funkin/backend/scripting/HScript.hx index 0597a32f..ba0f4b77 100644 --- a/source/funkin/backend/scripting/HScript.hx +++ b/source/funkin/backend/scripting/HScript.hx @@ -119,6 +119,10 @@ class HScript extends Script { interp.execute(expr); call("new", []); } + + #if GLOBAL_SCRIPT + funkin.backend.scripting.GlobalScript.call("onScriptSetup", [this, "hscript"]); + #end } public override function reload() {