From d430b645f02ddd8961e0116b2189de38ef263bb4 Mon Sep 17 00:00:00 2001 From: WizardMantis441 <77557487+WizardMantis441@users.noreply.github.com> Date: Sat, 20 May 2023 01:33:22 -0500 Subject: [PATCH] hscript calls (kinda?? horrible method tho) --- source/funkin/editors/charter/CharterEvent.hx | 8 ++++---- source/funkin/game/PlayState.hx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/funkin/editors/charter/CharterEvent.hx b/source/funkin/editors/charter/CharterEvent.hx index 0d62361d..f317c6b8 100644 --- a/source/funkin/editors/charter/CharterEvent.hx +++ b/source/funkin/editors/charter/CharterEvent.hx @@ -14,14 +14,14 @@ class CharterEvent extends UISliceSprite { name: "HScript Call", params: [ { - name: "Function name", + name: "Function Name", type: TString, defValue: "myFunc" }, { - name: "Function parameters (string)", - type: TArrayOfString, - defValue: [] + name: "Function Parameters (String split with commas)", + type: TString, + defValue: "" } ] } diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 365eb22b..99c852fd 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1172,8 +1172,8 @@ class PlayState extends MusicBeatState switch(event.type) { case CUSTOM: - if (event.params[0] is String && event.params[1] is Array) { - scripts.call(event.params[0], event.params[1]); + if (event.params[0] is String && event.params[1] is String) { + scripts.call(event.params[0], event.params[1].split(',')); } case CAM_MOVEMENT: if (event.params[0] is Int)