how damaged in max health percentage?

i want make a trap to event something

i used decrease health in party

but it can only number or variable

it can be damaged for actor's max health in every party?

ex) actor 1 's max hp is 1000 and actor 2 's max hp is 200
and 5% damage trap event -> actor 1's hp decrease 50 and actor 2's hp decrease 10

it is possible?
Yes, it's possible. If you can use a variable, then do the math needed in the value of this variable.
But do you are doing this damage with the event, or with the default damage floor?
Yes, it's possible. If you can use a variable, then do the math needed in the value of this variable.
But do you are doing this damage with the event, or with the default damage floor?

yes i know can variable use it but in my game actor is 50 more people... so i can't use it every time i use trap need use variable 50 more

and not the damage floor is just event like... um..
ex) choice only 1. A or B if choose A it was trap and all party actor damaged
you basicly need 2 vars, 1 actor HP, 1 for actors Max HP +1 more,
if you have YEP_SelfSwVar, you dont need 50+ vars, a self var take 1 for each event,
same is true for switches, this can save you lots of switches,
if dont in a common event, you can calculate the var easy and nicely.
you basicly need 2 vars, 1 actor HP, 1 for actors Max HP +1 more,
if you have YEP_SelfSwVar, you dont need 50+ vars, a self var take 1 for each event,
same is true for switches, this can save you lots of switches,
if dont in a common event, you can calculate the var easy and nicely.

oh thx but i don't understand how working in self switch and variable to every actor's hp % damage
Oh! I got it.
You can use this in a script call:
JavaScript:
for(let l = $gameParty.members().length; l--;){
    $gameParty.members()[l]._hp -= ($gameParty.members()[l]._hp * 0.10)
}
This will iterate all your party members and will remove a % of each's one hp.
Change the value "0.10" for the amount of % you want.
Oh! I got it.
You can use this in a script call:
JavaScript:
for(let l = $gameParty.members().length; l--;){
    $gameParty.members()[l]._hp -= ($gameParty.members()[l]._hp * 0.10)
}
This will iterate all your party members and will remove a % of each's one hp.
Change the value "0.10" for the amount of % you want.

OMG you...! you are genius Thank you very much sir!
Oh! I got it.
You can use this in a script call:
JavaScript:
for(let l = $gameParty.members().length; l--;){
    $gameParty.members()[l]._hp -= ($gameParty.members()[l]._hp * 0.10)
}
This will iterate all your party members and will remove a % of each's one hp.
Change the value "0.10" for the amount of % you want.

Oh wait...
It does not damage in proportion to the maximum health.
Damage is proportional to actor's current health.

by the way i need this too! to make poison system
my poison is too strong so i want current health damaged poison
but i don't know how to apply it to stat's damage fomular...
ops!
I'm sorry about that.
just change to this, then it will calculate based on the max hp value.
JavaScript:
for(let l = $gameParty.members().length; l--;){
    let id = $gameParty.members()[l]._actorId
    $gameParty.members()[l]._hp -= ($gameActors.actor(id).mhp * 0.10)
}
ops!
I'm sorry about that.
just change to this, then it will calculate based on the max hp value.
JavaScript:
for(let l = $gameParty.members().length; l--;){
    let id = $gameParty.members()[l]._actorId
    $gameParty.members()[l]._hp -= ($gameActors.actor(id).mhp * 0.10)
}

Thx now it working well !

Original thread: https://forums.rpgmakerweb.com/threads/how-damaged-in-max-health-percentage.120565/