TEMPORARY BOOSTS

Posts

Pages: 1
So currently, I'm making an area where you can build furniture inside your house.

But I can't seem to temporarily add health or mana to a character. What I mean by this is, when the character sits in a chair that he has made, is it possible for the event to give him full health but also an additional amount of health on top of his base health? Once the character is damaged though - and his health goes below his base health, he would not be able to get his health above the base health again, unless he sits in the chair again.

Also, this means that when the temporary health boost is active, potions would not affect the character.

And would it be possible for the chair to not pile boosts, meaning if I get the boost multiple times, I do not get an absurd amount of "temporary health"?

Thanks for your time.
slash
APATHY IS FOR COWARDS
4158
What version of RPG Maker (I assume) are you using? The ease of this is dependent on the engine. With 2k3 it might be tricky, but Ace and other more recent versions have a lot of scripting support that would make this easy.
Ahh I always keep on forgetting to tell people I'm using RPGMaker XP. Sorry about that.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
Make a parallel process event that sets two variables to the hero's maximum HP. In the chair event, make a conditional branch that runs if the second variable is equal to the first, in which you increase the hero's maximum HP, set the second variable to the new total, and restore the HP to its maximum.

There are two ways to achieve the latter criteria regarding damage: the first is the most tedious, which is to make a battle event in every enemy party that runs every turn, which checks to see if the hero's current HP is equal to or less than the value of the first variable, and if it is sets the hero's maximum HP to that variable's value.

The second way would be to edit the actual damage part of the battle script so that it checks the health of the hero after the damage calculation and adjusts the variables from there. If you don't know RGSS let me know and I'll try to help you with this.
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
author=Trihan
There are two ways to achieve the latter criteria regarding damage: the first is the most tedious, which is to make a battle event in every enemy party that runs every turn, which checks to see if the hero's current HP is equal to or less than the value of the first variable, and if it is sets the hero's maximum HP to that variable's value.
You can do this as a common event. Parallel process common events run during battle in RMXP, I'm pretty sure.

Here's how I'd do it: make the furniture apply a status effect that increases max HP. Run a common event as a parallel process that checks to see if you have the status effect, and if you are, then it checks to see if you're missing at least the amount of HP that the status effect adds, and if you are, then it removes the status effect.

This method will leave the character with the buff until they take enough damage, though. Which means that if they have 1000 max HP originally, and the furniture buffs them to 1400 max HP, they can be damaged down to 1001 max HP and then heal themselves back up to 1400. If this isn't what you want, you'll need some sort of seperate method of making them immune to healing while the status effect is active. I'm sure you can find a "immune to healing status effect" script out there though.
In simplest terms, what you'd do is make a sort of hp "bank". This would be better as a potion, since you can't revisit it like you can with furniture (at least, not without getting more potions). You drink the potion, switch Special Potion ON.

Common Event: Special Potion
Complete Healing (or Change HP +9999, or no hp restore at all)
Change Variable TempHP +1000
Special Potion OFF

Now, in battle, you have among your Turn 1x battle events
Call Common Event: TempHP

Common Event: TempHP
Variable CurrentHP Set Char1 HP
Variable MaxHP Set Char1 Max HP
Variable HPDiff Set Variable MaxHP
Variable HPDiff -Variable CurrentHP
(do this for each character, using a bunch of variables then move it to common events to speed stuff up)
If TempHP > 0
If TempHP >= HPDiff
Change HP +HPDiff
Change Variable TempHP -HPDiff
Else
Change HP +TempHP
Change Variable TempHP Set 0
End
(do this for each character, making it really TempHP1, TempHP2, etc)
End Event Processing

LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
I really think a status effect that increases max hp would be much simpler than coding it manually...
Craze
why would i heal when i could equip a morningstar
15170
95% sure RMXP came with that feature ;V
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
I don't think parallel process common events do run during battle, LockeZ.
It does. And it doesn't.

Events in battle must run through the battle event, either as a common event, or a switch event. What does this mean?

It means if you have a switch item set to field/battle, it won't seem to run on the same common event that the switch ON was. Or will it? It may interest you to know that you can actually call any common events, not just Call Events (a detail that might have helped a bit earlier, before I made a bunch of duplicate common events).

Pages: 1