As the title says.
Let's say you whack an enemy and they're dropped to less than half health. What I want to do is configure it so when you escape, they keep that amount of health when you encounter them again. You know, instead of fighting them with full HP again.
(I have a visual encounter system, for further context)
Hiya !
Quick question, do you want that feature for one single enemy, multiple enemies, or every enemy you encounter ? Asking that because the approach might be different depending on what you want.
(By the way, by 'visual encounter system', do you mean you can see the enemies on the screen and you run into them to fight or is it something else ?)
You can see the enemies on the screen before you fight them, yes.
The idea for this is mainly for boss fights, since for normal encounters it's unreasonable due to the vast number of them.
Stuff like a roaming boss (the best example I have is the Deathgaze enemy from Final Fantasy 6).
Alright, so if you're familiar with Variables, I think I have a solution !
You're gonna need two variables (I'll call them A and B ).
In your battle events, you'll need two pages, one that happens at the start of the battle and the other that happens at the end of every turn.
First page would go like this :
Change enemy health (reduce it by Variable, use A)
It will be used to change an enemy's health according to variable A
The second one is like this :
Control Variable : Set A to Enemy Max Health (Other -> Enemy -> Max HP)
Control Variable : Set B to Enemy Health (Other -> Enemy -> HP)
Control Variable : Subtract Variable B to Variable A
(My RPG Maker is in French, so the terminology of commands might not be exact)
What we're doing here is that, at the end of every turn of battle, the difference between the enemy's max health and its current health (the amount of HP it has therefore lost since the beginning of the battle) is stored in Variable A.
This amount is removed from the enemy's HP when a battle with it begins, so it should have the health you left it at previously !
It's untested, but it should work ! Tell me if you have any problems !
Note you will need a variable for each and every enemy in your game if you do it this way, so I hope you either have less than 999 enemies or aren't using this for every enemy. If you need it for more than that you'll need a script.
Nice ! Is the glitch fixed if you change the frequency of the second event from "Every Turn" to "Always" ?
If several of those specific enemies are available at the same time, remember that you will still have to use different variables (At least Variable A will have to be different, since B is just a transit variable and isn't used outside of operations) !
But you're welcome ! Best of luck in your RPG Making !