Porcentual damage vía events

Sorry to brother yourselves. I'm working un a Day/night system with random weathers. One of the features is that the characters can receive damage from a lighting during storms bit i noticed that the damage is fixed. For example 100,200 ir 500. I want to make it porcentual so the characters can receive damage equal to 3% of his max HP (For example) i want to expand it to enemies and battles (aside maps) too bit i don't know how... PD: WHEN I COMPLETE THE PROYECT I WILL UPLOAD IT.
BY THE MOMENT I LEAVE A SCREENSHOT.
I can't test the following way for MZ, as I only have MV. But they seem similar enough, that the solution will probably also work in MZ.

1. Set a variable to the max HP of the character which you want to damage.
2. Multiply the variable with 0.03 (or whatever percentage you wish to do the damage with)
3. Damage the character by the amount stored in the variable
Thanks you very much sir. I will try it when i get home. Excuse me for my bad english and greetings form Argentina.

Original thread: https://forums.rpgmakerweb.com/threads/porcentual-damage-via-events.142478/