Hello. I'm trying to create an
#FF8C00">Attack Interrupt skill and
#FF8C00">Magic Interrupt skill. The idea is that when you use
#FF8C00">Attack Interrupt skill orÂ
#FF8C00">Magic Interrupt skill on an enemy, then that enemy will be inflicted with
Attack Interrupt State orÂ
Magic Interrupt State respectively. Both of these states last for 10 turns. So, whenever the enemy attacks when it has
Attack Interrupt State applied on itself, then that attack is interrupted (it failed) and the enemy also receives some HP damage. Likewise, whenever the enemy uses magic when it has
Magic Interrupt State applied on itself, then that magic skill is interrupted (it failed) and the enemy also receives some HP damage.
To create these effects, I use
Yanfly Battle Engine Core and
Yanfly Buffs & States Core. Now, the scripts that I wrote for both
Attack Interrupt State and
Magic Interrupt State works fine if the enemy is applied with only
ONE of either states at a time. If the enemy has
BOTH states at the same time, I found that when the enemy
ATTACKS, it will lead to an error as shown in this pic:
Whereas when the enemy uses magic, even if the enemy has both states at the same time, the
Magic Interrupt still works fine. Could anyone help me with this issue, maybe point out what is wrong with my script or maybe suggest an alternative way to achieve the same effects?
These are the scripts that I used for both
Attack Interrupt State and
Magic Interrupt State:
Attack Interrupt State:
http://pastebin.com/6gL1r5mv
#FF0000">Magic Interrupt State:
http://pastebin.com/r3TtR66M
These are the plugins that I use:
#0000FF">Yanfly Battle Engine Core:
https://www.dropbox.com/s/4mgcqz5hgnblwez/YEP_BattleEngineCore.js?dl=0
#0000FF">Yanfly Buffs & States Core:
https://www.dropbox.com/s/0fk64r7zwfx90fo/YEP_BuffsStatesCore.js?dl=0
(I also use
#0000FF">Yanfly Core Engine to activate the developer's console. The core engine is not required for these effects to occur.
https://www.dropbox.com/s/uzfxvvp17ypb1tb/YEP_CoreEngine.js?dl=0 )
Finally, this is the
#EE82EE">sample project file for this issue:
https://www.dropbox.com/s/ljkfmvkxqrxjumu/Project1.rar?dl=0
To replicate the issue:
1) Encounter the bat enemy in the map
2) Use
#FF8C00">Attack Interrupt skill under Magic
3) Use
#FF8C00">Magic Interrupt skill under Magic
4) If the enemy uses magic, the Magic Interrupt effect should work fine, but if the enemy uses attack, then the game will crash with error as shown in the picture above.
I've been stuck with this problem for a week and couldn't find a way to solve it.
