How could I do for an hp variable?

ShadowCaptain22

The divine emperor
Member
Joined
Jun 19, 2019
Messages
17
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
Hello, I am interested in making a transformation that is only when the character has less than 15% health.
Suppose we have Meliodas and having less than 15% active assault mode, because all that I want to do with the variables.
I know there is already a topic on this, but I have not just clarified how to put the variables and conditions.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
What do you exactly mean by "transformation"? Like using a different actor but keeping the same amount of HP and MP?
 

ShadowCaptain22

The divine emperor
Member
Joined
Jun 19, 2019
Messages
17
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
What do you exactly mean by "transformation"? Like using a different actor but keeping the same amount of HP and MP?
I explain, let's say that the character arrives at 15% health which is 350, is an example, because what he would do is add the status of "assault mode", and change the graphics of the face. But for this I need a series of variables that I do not know how to put, since it's not the kind of transformation that uses a skill and a common event does, that's not it.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Does that happen only in battle or does it happen when taking damage in the map as well (by stepping on hurting tiles)?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,431
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
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.
 

ShadowCaptain22

The divine emperor
Member
Joined
Jun 19, 2019
Messages
17
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
Does that happen only in battle or does it happen when taking damage in the map as well (by stepping on hurting tiles)?
I have thought only of battle, that it is transformed by soil damage is a bit stupid xd
 

ShadowCaptain22

The divine emperor
Member
Joined
Jun 19, 2019
Messages
17
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
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.
If you could do it, it would be perfect

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.
Already, in a post I also saw it, but I do not know how to put everything, could you send me an image?
 

ShadowCaptain22

The divine emperor
Member
Joined
Jun 19, 2019
Messages
17
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,431
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
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
 

ShadowCaptain22

The divine emperor
Member
Joined
Jun 19, 2019
Messages
17
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
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
Could you send me a picture of how to put all this? Among other things that does not work for me
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,431
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
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.15check.png
 

ShadowCaptain22

The divine emperor
Member
Joined
Jun 19, 2019
Messages
17
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
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.15View attachment 118205
Well it still does not work, I tried another one where I do not use the Atelier Rgss, but nothing.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,431
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
Well it still does not work
How did you make those lines? Have you read my comment?
(that is an option in the game data section of the control variable command)
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,431
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
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
 

ShadowCaptain22

The divine emperor
Member
Joined
Jun 19, 2019
Messages
17
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
That photo was only for you to see if I have the commands that you had specified well, this is with the effects.
 

Attachments

ShadowCaptain22

The divine emperor
Member
Joined
Jun 19, 2019
Messages
17
Reaction score
0
First Language
Spanish
Primarily Uses
RMMV
Yes, I am so original not to title it xd
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,431
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top