Hi, I'm in the middle of making a summoning skill (kind of) and I needed to remove all actors but the first four, then add them back. I've made this test event that works just fine (there's a second page where I add them back in the same order and, again, works like I charm. I can show it if needed but it's just a bunch of conditional branches).
The problem comes when I try to do the same in battle, where the game gives me a Type Error when using a skill that calls a common event just like the event above. I think the error has something to do with the variables, but I just don't know how to fix it or work around it.
I'd appreciate any help I can get. I'm sure there are details I'm not telling so if you need any info please ask away. I've been searching for a few days now and I feel I'm really close to finally finishing.
The problem comes when I try to do the same in battle, where the game gives me a Type Error when using a skill that calls a common event just like the event above. I think the error has something to do with the variables, but I just don't know how to fix it or work around it.
Code:
$gameParty.members()[4]._actorId
YEP_EnhancedTP.js:4035 TypeError: Cannot read property '_actorId' of undefined
at eval (eval at Game_Interpreter.command122 (YEP_CoreEngine.js:1540), <anonymous>:1:24)
at Game_Interpreter.command122 (YEP_CoreEngine.js:1540)
at Game_Interpreter.executeCommand (rpg_objects.js:8930)
at Game_Interpreter.update (rpg_objects.js:8838)
at Game_Troop.updateInterpreter (rpg_objects.js:5226)
at Function.BattleManager.updateEventMain (rpg_managers.js:2281)
at Function.BattleManager.updateEvent (YEP_BattleEngineCore.js:1948)
at Function.BattleManager.update (YEP_BattleEngineCore.js:1906)
at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
at Scene_Battle.update (rpg_scenes.js:2257)
rpg_managers.js:1949 TypeError: require(...).Window.get(...).isDevToolsOpen is not a function
at Object.Yanfly.Util.displayError (YEP_EnhancedTP.js:4037)
at Game_Interpreter.command122 (YEP_CoreEngine.js:1542)
at Game_Interpreter.executeCommand (rpg_objects.js:8930)
at Game_Interpreter.update (rpg_objects.js:8838)
at Game_Troop.updateInterpreter (rpg_objects.js:5226)
at Function.BattleManager.updateEventMain (rpg_managers.js:2281)
at Function.BattleManager.updateEvent (YEP_BattleEngineCore.js:1948)
at Function.BattleManager.update (YEP_BattleEngineCore.js:1906)
at Scene_Battle.updateBattleProcess (rpg_scenes.js:2265)
at Scene_Battle.update (rpg_scenes.js:2257)
I'd appreciate any help I can get. I'm sure there are details I'm not telling so if you need any info please ask away. I've been searching for a few days now and I feel I'm really close to finally finishing.