Creating an "injured" trigger without variables

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
72
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,453
Reaction score
12,014
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
72
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,191
Reaction score
6,758
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
72
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 Posts

Latest Profile Posts

Well... it’s been a real pain in the IRS today. :/
My kitty still young (3-4 months), I think I could teach her some funny tricks... like: "Play dead-ly good music for my games"
Here's a quality DPS class idea: The Beekeeper, who uses the "Bees!!" skill to attack and poison enemies.
Please don't create long, boring cutscenes in which characters do nothing but stand around talking.
What if I took a lesson from Half Minute Hero? Let the player get dumb powerful each area, but reset them down to just slightly stronger than before for the next map?

Forum statistics

Threads
94,269
Messages
919,522
Members
123,990
Latest member
bartzfact0r
Top