MZ Visustella Damage Color Issues

Hi,

I'm having an issue with Damage Color Settings in the Visustella core engine. What I'm trying to accomplish is I want the damage number of each actor to be a different color. So Actor 1's damage numbers will be blue, and Actor 2's damage numbers green etc.

I was able to accomplish this with the following code in the Core Engine Damage Color section under Case 0: HP

JavaScript:
if ($subject.actorId() == 1) {
        return "#009CFF";
     } else if ($subject.actorId() == 2) {
        return "#00D000";
     } else if ($subject.actorId() == 3) {
        return "#C14D59";
     } else {
        return "#ffffff";
    }

It works great. Each actor attacks and their respective color is show. The issue starts when a state is added. I'm also using Visual State effects so there are text popups when states are added and removed. However, when a state popup is supposed to proc, I get the following crash:

1754824185860.png


My assumption is that the State popups also used the HP Damage color, and when "subject or actor id" is being called it crashes because State has no id? I'm not sure, and I'm looking for some help in trying to get this to work.

Thanks for reading this!
you can try $subject && $subject.actorId() === 1 and so on
since $subject is conditionally null, just checking for it before you use it should be enough
you can try $subject && $subject.actorId() === 1 and so on
since $subject is conditionally null, just checking for it before you use it should be enough
That seemed to work!

Thanks!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/visustella-damage-color-issues.179488/