I encountered a glitch where if an actor's hp hits zero in the middle of selecting a command, the game will crash saying: TypeError Cannot read property 'setAttack' of undefined. I ran into this same glitch in a different odometer script that was for vx ace and fixed it there by skipping actor command input processing if hp is zero or lower. I'm not sure how or if this could be done in mv, and there could be a better solution.
Viewing post in Odometer Gauge - RPG Maker MV/MZ Plugin comments
Hi, I spent a good amount of time trying to replicate this bug and was ultimately unable to (which doesn't mean it's not there, just that it's hard to replicate). For Version 1.2.0, I did make some changes to the code around those interactions so hopefully you won't run into this issue as often. However, if this glitch is persisting, please let me know what steps it takes to occur (screenshots can help) and what other plugins you are using along with this one. Once I am able to replicate the issue, I should have a better chance of knowing where I need to make this fix and can issue a patch :)
- Neel
I still get this glitch in the 1.2.0 MV demo.
To replicate the bug easier, I edited the minotaur attack in the database to max so that it would do mortal damage to a party member straight away.
I then just sat on that soon to be dead party member's command selection window until they reached 0 HP, then if I tried to proceed and select 'guard' for example, it would throw up an error. I assume because a now dead actor is trying to do something (guard in this case)