I'm using Mewgles' " Show Event Names and Icons" plugin, and I wanted to use a variable as the "Image" parameter on the "Set Event Sign" command. Since I cant do that with the built in command, I tried to use a script call. Before I could get to the variable idea, I realized I didn't know how to replicate the command with a script. Here's what I wrote:
The problem I'm having is with the "Animation" parameter. It uses a struct as the argument, and I don't know how to edit that.
The code above outputs this in the console:
Any help, or a different method for the variable thing? I'm stumped lol
PluginManager.callCommand(this, "MewglesShowNames", "Set_Event_Sign_A",
{ Map_ID: "9",
Event_ID: "4",
Image: "Talk0",
Opacity: "255",
Animation: { "Animation_Type": "Bounce", "Max_Movement": "25", "Speed": "5", "Delay": "0" },
Horizontal_Offset: "-20",
Vertical_Offset: "20",
Display_Status: "Display",
No_Proximity: "OFF" }
);
{ Map_ID: "9",
Event_ID: "4",
Image: "Talk0",
Opacity: "255",
Animation: { "Animation_Type": "Bounce", "Max_Movement": "25", "Speed": "5", "Delay": "0" },
Horizontal_Offset: "-20",
Vertical_Offset: "20",
Display_Status: "Display",
No_Proximity: "OFF" }
);
The code above outputs this in the console:
MewglesShowNames: Sign Animation setting is missing in event 4
js/plugins/MewglesCore.js:289 SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at Function.MewglesCore.JSONParse (js/plugins/MewglesCore.js:286)
at Function.MewglesShowNames.setEventSigns (js/plugins/MewglesShowNames.js:924)
at Game_Interpreter.<anonymous> (js/plugins/MewglesShowNames.js:1080)
at Function.PluginManager.callCommand (js/rmmz_managers.js:3105)
at eval (eval at Game_Interpreter.command355 (js/rmmz_objects.js:11256), <anonymous>:1:15)
at Game_Interpreter.command355 (js/rmmz_objects.js:11256)
at Game_Interpreter.<computed>.<computed> [as command355] (js/plugins/VisuMZ_0_CoreEngine.js:7602)
at Game_Interpreter.executeCommand (js/rmmz_objects.js:9625)
at Game_Interpreter.<computed>.<computed> [as executeCommand] (js/plugins/VisuMZ_1_EventsMoveCore.js:6880)
js/plugins/VisuMZ_0_CoreEngine.js:7602 Script Call Error
js/plugins/VisuMZ_0_CoreEngine.js:7602 TypeError: Cannot read property 'Delay' of undefined
at Function.MewglesShowNames.setEventSigns (js/plugins/MewglesShowNames.js:925)
at Game_Interpreter.<anonymous> (js/plugins/MewglesShowNames.js:1080)
at Function.PluginManager.callCommand (js/rmmz_managers.js:3105)
at eval (eval at Game_Interpreter.command355 (js/rmmz_objects.js:11256), <anonymous>:1:15)
at Game_Interpreter.command355 (js/rmmz_objects.js:11256)
at Game_Interpreter.<computed>.<computed> [as command355] (js/plugins/VisuMZ_0_CoreEngine.js:7602)
at Game_Interpreter.executeCommand (js/rmmz_objects.js:9625)
at Game_Interpreter.<computed>.<computed> [as executeCommand] (js/plugins/VisuMZ_1_EventsMoveCore.js:6880)
at Game_Interpreter.update (js/rmmz_objects.js:9530)
at Game_Map.updateInterpreter (js/rmmz_objects.js:6761)
js/plugins/MewglesCore.js:289 SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at Function.MewglesCore.JSONParse (js/plugins/MewglesCore.js:286)
at Function.MewglesShowNames.setEventSigns (js/plugins/MewglesShowNames.js:924)
at Game_Interpreter.<anonymous> (js/plugins/MewglesShowNames.js:1080)
at Function.PluginManager.callCommand (js/rmmz_managers.js:3105)
at eval (eval at Game_Interpreter.command355 (js/rmmz_objects.js:11256), <anonymous>:1:15)
at Game_Interpreter.command355 (js/rmmz_objects.js:11256)
at Game_Interpreter.<computed>.<computed> [as command355] (js/plugins/VisuMZ_0_CoreEngine.js:7602)
at Game_Interpreter.executeCommand (js/rmmz_objects.js:9625)
at Game_Interpreter.<computed>.<computed> [as executeCommand] (js/plugins/VisuMZ_1_EventsMoveCore.js:6880)
js/plugins/VisuMZ_0_CoreEngine.js:7602 Script Call Error
js/plugins/VisuMZ_0_CoreEngine.js:7602 TypeError: Cannot read property 'Delay' of undefined
at Function.MewglesShowNames.setEventSigns (js/plugins/MewglesShowNames.js:925)
at Game_Interpreter.<anonymous> (js/plugins/MewglesShowNames.js:1080)
at Function.PluginManager.callCommand (js/rmmz_managers.js:3105)
at eval (eval at Game_Interpreter.command355 (js/rmmz_objects.js:11256), <anonymous>:1:15)
at Game_Interpreter.command355 (js/rmmz_objects.js:11256)
at Game_Interpreter.<computed>.<computed> [as command355] (js/plugins/VisuMZ_0_CoreEngine.js:7602)
at Game_Interpreter.executeCommand (js/rmmz_objects.js:9625)
at Game_Interpreter.<computed>.<computed> [as executeCommand] (js/plugins/VisuMZ_1_EventsMoveCore.js:6880)
at Game_Interpreter.update (js/rmmz_objects.js:9530)
at Game_Map.updateInterpreter (js/rmmz_objects.js:6761)
Any help, or a different method for the variable thing? I'm stumped lol