Call common event when damaged?

Greetings, fellow forum-goers!

I'm trying to figure out if there is a way to have a common event trigger when a specific actor is damaged. For example: when "Bill" is hit and takes any amount of HP damage, it runs a common event that generates a potion. I've searched and searched, and I'm probably not searching for the right thing.

Any help would be greatly appreciated.
You can do that without plugins, by running an event in the troop page, which is triggered turn 0, and uses 1 variable. (VarA):

- Set varA = Actor HP

Now make a new event that triggers turn 1 + 1 * x, which means it runs the first turn and every turn after that.
1671387583170.png


This event will we make one more variable, varB:

Set varB = Actor HP
If varA > varB
.. Give potion
.. Set varA = Actor HP
end
Fantastic! I've got it set up, I'll test it later today when I have time.

Thank you very much. :LZSlol:
Cool cool. Let me know if you got it to work like that.
It works! Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/call-common-event-when-damaged.153390/