I want one of my characters to completely recover all HP and MP after each battle she fights. I found a script for that, but I have not been able to make it work, and the thread is 3 years old and archived. Can anyone help?
Player completely heals after battle?
RGSSx Script SupportI've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
Just post a link to the thread.
Just post a link to the thread.
Sorry 3:
http://www.rpgmakervxace.net/topic/3239-restoreset-after-battlelevel/
'Twas this. I thought I was using it right but I guess not. Here are the parts I changed:
http://www.rpgmakervxace.net/topic/3239-restoreset-after-battlelevel/
'Twas this. I thought I was using it right but I guess not. Here are the parts I changed:
Code:
#Restore after battle for specific actors only:RAB_SPECIFIC_ACTORS_B = true#Array of actor id'sRAB_ACTORS_B = [4]#HPSETTYPE and MPSETTYPE# Set to 0 for setting of hp/mp to a specific number after battle.# Set to 1 for setting of hp/mp to a specific percentage after battle.# Set to 2 for adding to hp/mp by a certain percentage of maxhp/maxmpHPSETTYPE = 2 MPSETTYPE = 2
As an alternative, you could do this without a script.
[SIZE=10.5pt]If it's an evented encounter, you can just use the "Full Recovery" command in the first tab of the events command window (under the actors tab). Specify the actor if it is only one.[/SIZE]
[SIZE=10.5pt]If it's a random encounter, you'll have to add the "Full Recovery" command in the troops page of the database, giving it to spawn at 'End of Battle'. Again specify the particular actor if needed.[/SIZE]
[SIZE=10.5pt]If you want a percentage instead of full recovery, just specify what you want. If you want a fixed amount, then use the Change HP, Change MP commands.[/SIZE]
[SIZE=10.5pt]If it's an evented encounter, you can just use the "Full Recovery" command in the first tab of the events command window (under the actors tab). Specify the actor if it is only one.[/SIZE]
[SIZE=10.5pt]If it's a random encounter, you'll have to add the "Full Recovery" command in the troops page of the database, giving it to spawn at 'End of Battle'. Again specify the particular actor if needed.[/SIZE]
[SIZE=10.5pt]If you want a percentage instead of full recovery, just specify what you want. If you want a fixed amount, then use the Change HP, Change MP commands.[/SIZE]
You don't need a script, lol. Just have a switch turn on in every encounter, and then an auto-start event under common events that runs when the switch is on. The auto-start event then fully heals the characters and turns itself off again.
I can't find an "end of battle" option.
You're going to have to be more specific. Also, after a battle I want the player to be able to open up the menu and see that the character is completely healed, instead of just being healed when a new battle begins. Specifically so that she can't use the healing items in it.
That would heal the character automatically after every battle.
No I mean be specific in what kind of switch you're talking about, and what would be activated by the switch. Just telling me to turn a switch on and off doesn't let me know what to do.
Give me an example or something. I am a visual learner, so in lieu of visuals you have to be reeeaaally specific with me.
EDIT: Should this be moved back to the other forum...?
I would turn the switch off AFTER doing the healing. And it can also be a parallel process event - doesn't have to be autorun.
Are you happy to set that up for every battle? If you'd rather a scripted solution, I can give you one.
Are you happy to set that up for every battle? If you'd rather a scripted solution, I can give you one.
Actually, I found that all I need to do is put a "Recover All" parallel process on the map. But, thanks for trying to help out guys.
That means you're never going to get slip damage or damage from terrain.
Also, bad idea to have a parallel process running ALL THE TIME for something that's ONLY ever going to happen the moment you end a battle. Bad design choice there, and you're going to end up with lag in your game as a result, especially if this is your "go-to" solution for a number of issues.
If you HAVE to use a parallel process (do it as a common event, not a map event), add a Wait 30 Frames to it, so it's not trying to do it 60 times a second.
Also, bad idea to have a parallel process running ALL THE TIME for something that's ONLY ever going to happen the moment you end a battle. Bad design choice there, and you're going to end up with lag in your game as a result, especially if this is your "go-to" solution for a number of issues.
If you HAVE to use a parallel process (do it as a common event, not a map event), add a Wait 30 Frames to it, so it's not trying to do it 60 times a second.
The only time this is used is during specific and relatively small puzzle maps (which have no slip damage or terrain damage) where there are only two parallel processes running at the same time. Just two. I don't use parallel processes as a "go-to" solution, I would expect you of all people to know that it's usually scripts with me. And I currently have 25 user scripts, which is a lot since I remember someone telling me most developers only have one or two. I don't want to add any more unless absolutely necessary.
I see no problem in using a parallel process for this if there are literally only two for each map this is needed for, including this process. But I did do what you said about the common event, and it works fine.
I see no problem in using a parallel process for this if there are literally only two for each map this is needed for, including this process. But I did do what you said about the common event, and it works fine.
Original thread: https://forums.rpgmakerweb.com/threads/player-completely-heals-after-battle.36719/