How could I do for an hp variable?
RPG Maker VXAce SupportWhat do you exactly mean by "transformation"? Like using a different actor but keeping the same amount of HP and MP?
Does that happen only in battle or does it happen when taking damage in the map as well (by stepping on hurting tiles)?
If it is only in battle Iavra has a script which more or less does this. When you reach a predetermined level of HP you can specify what is to happen. No variables involved.
I'm on my phone just now so can't check exactly what it's called but if you are interested I can look later.
I'm on my phone just now so can't check exactly what it's called but if you are interested I can look later.
you can use the control variable command to get both current HP and current MaxHP for any actor (it's in the game data section, the one that defaults to map id)
and then it's only mathematics to check if the current HP is less than 15% of the current maxHP.
and then it's only mathematics to check if the current HP is less than 15% of the current maxHP.
1) control variable command to load actor HP into variable 1 (that is an option in the game data section of the control variable command)
2) control variable command to load actor MHP into variable 2
3) control variable command to multiply variable 2 (the one that now contains MHP) with 0.15 (that is mathematic for 15%)
4) conditional branch "is variable 1 smaller than variable 2"? if yes the current HP is less than 15% of the max HP and you can do whatever you want inside the branch
2) control variable command to load actor MHP into variable 2
3) control variable command to multiply variable 2 (the one that now contains MHP) with 0.15 (that is mathematic for 15%)
4) conditional branch "is variable 1 smaller than variable 2"? if yes the current HP is less than 15% of the max HP and you can do whatever you want inside the branch
the picture shows exactly what I wrote, the only difference is that I forgot that you can't use float numbers so it's multiply by 15 and div by 100 instead of only multiply by 0.15
How did you make those lines? Have you read my comment?
The only time this didn't work for anyone was when the person wrote the lines into the script line instead of selecting the options in the game data line.
that said, give a screenshot of what you have done and we can tell you where you went wrong. But "does not work" never helps in bughunting, more details are always needed.
that event does nothing because you didn't add any commands to do anything.
I specifically made the comments so that you know where to add the commands that should happen if the current HP is less than 15% max HP of where to add the commands of what should happen if it is more than 15% mac HP, but if you add no commands then of course it does nothing
I specifically made the comments so that you know where to add the commands that should happen if the current HP is less than 15% max HP of where to add the commands of what should happen if it is more than 15% mac HP, but if you add no commands then of course it does nothing
then what happens or not happens? how did you try to start the event?
I assume by skill, so what does the skill do?
we can't help if you don't give details that let's us see where you made a mistake, so we need more screenshots and more descriptions of what happens.
I assume by skill, so what does the skill do?
we can't help if you don't give details that let's us see where you made a mistake, so we need more screenshots and more descriptions of what happens.
Original thread: https://forums.rpgmakerweb.com/threads/how-could-i-do-for-an-hp-variable.110162/