Hello, this is my first game and first post on this forum.
I am using this script to add states to enemies, from a common event
This works for giving the enemies the state exactly as it should. However the battle log does not display the "If an enemy is afflicted with the state" message. If I add the state the more normal way with effects inside skills/items, then the message shows correctly. It is only when adding the state from a common event that the message doesn't work.
I see this message from the DevTools window. It looks like that is where the problem is, but I have no real idea what it means or how to fix it.
Disabling all plugins doesn't change anything.
I know how to add the messages manually with
But that seems very messy and not ideal.
I am using this script to add states to enemies, from a common event
$gameTroop._enemies[n].addState(13)This works for giving the enemies the state exactly as it should. However the battle log does not display the "If an enemy is afflicted with the state" message. If I add the state the more normal way with effects inside skills/items, then the message shows correctly. It is only when adding the state from a common event that the message doesn't work.
I see this message from the DevTools window. It looks like that is where the problem is, but I have no real idea what it means or how to fix it.
Script Call Error
VisuMZ_0_CoreEngine.js:6907 TypeError: Cannot read property 'addState' of undefined
at eval (eval at Game_Interpreter.command355 (rmmz_objects.js:11252), <anonymous>:2:24)
at Game_Interpreter.command355 (rmmz_objects.js:11252)
at Game_Interpreter.<computed>.<computed> [as command355] (VisuMZ_0_CoreEngine.js:6907)
at Game_Interpreter.executeCommand (rmmz_objects.js:9621)
at Game_Interpreter.update (rmmz_objects.js:9526)
at Game_Troop.updateInterpreter (rmmz_objects.js:5848)
at Function.BattleManager.updateEventMain (rmmz_managers.js:2379)
at Function.BattleManager.updateEvent (rmmz_managers.js:2372)
at Function.BattleManager.update (rmmz_managers.js:2335)
at Scene_Battle.updateBattleProcess (rmmz_scenes.js:2977)Disabling all plugins doesn't change anything.
I know how to add the messages manually with
SceneManager._scene._logWindow.addText(text)But that seems very messy and not ideal.