MZ HUD Maker Pro - How to change change a picture via code (on hover)

RMMZ 1.6.1

Hello.

So in HUD Maker Pro, I've got a picture element that is 1 of 2 images depending on a switch being flipped on. I'd like to be able to change the image on hover/unhover, similar to how you'd change the hue or what have you to give info to the user. Although it should only do this if image 2 is being displayed, otherwise don't do any hover effect. As with most things HUD Maker, I can't find any info in this.

So, if it's on image 1 = locked regardless of any actions.
If image 2 and isHovered = change image to "whatever.png" / on unhover change back to image 2.

I could achieve something like that by using 2 elements and switch between them, I was just wanting to keep it to the one if possible.

Any info would be appreciated!
Since the HUD is referencing a picture position in an array you would have to have a script that dynamically changes what picture is in what position of the array. This would be a script independent of the HUD.
Since the HUD is referencing a picture position in an array you would have to have a script that dynamically changes what picture is in what position of the array. This would be a script independent of the HUD.
As is typical with these things, I found a solution shortly after posting haha.

If you make a dedicated isHovered switch in RPGM, you can use the addon Hover to turn that switch on/off. Then in the picture code, you can just check if the isHovered switch is on/off and change the image according to that.

Original thread: https://forums.rpgmakerweb.com/threads/hud-maker-pro-how-to-change-change-a-picture-via-code-on-hover.157734/