Creating an "injured" trigger without variables

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
76
Reaction score
8
First Language
english
Primarily Uses
RMMV
So, I'm trying to create an event where the player interacts with it and if they are injured then the event heals them a bit.

The problem is getting the conditional branch that triggers the healing to detect if the player is injured or not.

The only way I've figured out how to do this is by creating a variable for player max HP and a second one for player current HP and then set the conditional branch to trigger if current HP is less than max HP.

...but I'm trying to avoid overloading the game with too many switches and variables to avoid making it difficult to sort through them all and this is something that's only going to happen once or twice and be accessible only briefly so I'd rather not use two variables just to handle it.

Any way to do it a bit easier? Or should I just get over myself and make the variables?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,522
Reaction score
12,054
First Language
English
Primarily Uses
RMMV
One variable is not overloading the game.

Are you talking about the party leader, everyone in the party, or a particular actor? Or do you have a game where there is only one person in the party? The "player" controls the whole party, not just one actor.

Conditional Branch: Script: $gameParty.leader().hpRate() < 1

should get you at least to a starting point
 

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
76
Reaction score
8
First Language
english
Primarily Uses
RMMV
At this time in the game there's just one character in the party.

Thanks for the script, I'll see if I can get that to work.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,230
Reaction score
6,776
First Language
German
Primarily Uses
RMMV
you can define a few "Temp" variables to handle everything that does not need to be remembered.

You just have to remember that you'll need to load whatever you need into the temp variables at the beginning of the event and to never use them to store data after the event ended and you're fine with using the same temp variables for hundreds of different calculations.
 

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
76
Reaction score
8
First Language
english
Primarily Uses
RMMV
That's not a bad idea. I'll keep that in mind.
 

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

Latest Threads

Latest Profile Posts

Well it's been almost a whole year since I joined RMW, so i figured I should update my status.
This is my updated status.
Here's a sample of some pixel edits I made.

Maybe for use as sidewalks.
If there are any mods or admins online, could you please see about the re-translation pages for RPG Maker MV? They are all down :rsad:
Werewolf cons: you lose control of yourself once a month and could accidentally kill your friends. Vampire cons: no garlic bread. The choice is simple. Werewolf for sure.
2 huge market drops in 2 days. So glad I sold my non-dividend stocks about 2 weeks ago. And if the dividend ones drop heavily, hey more cheap stocks for me!

Forum statistics

Threads
94,526
Messages
921,605
Members
124,378
Latest member
friskyomega
Top