does anyone have a script that at the end of every battle, a certain percentage of your sp is recovered? Like in Tales of Symphonia, thanks in advance
That sounds very interesting, I would also perhaps like that to happen in my game. I'll try and figure this out.
Sounds simple, I'll do this tomorrow if no one else beats me to this.
class Auto_Recover
def main
for i in 0..3
max = $game_party.actors[i].maxsp
now = $game_party.actors[i].sp
now = now + (max/10)
end
end
end
I don't know it works or not ('coz I didn't use RGSS for a long time) but that's the concept. And it's still need an identifier that make sure that this script ONLY works when you won a battle...
Nets, Falcon, sorry! As with all of my scripts, if you have a question on how I did something then just ask and I'll respond. Also, dead actor's will not regain SP at the end of battle.
class Scene_Battle
alias shinami_start_phase5 start_phase5
def start_phase5
for i in 0...$game_party.actors.size
unless $game_party.actors[i].dead?
sp_regain = $game_party.actors[i].maxsp * 0.1
$game_party.actors[i].sp += sp_regain.to_i
end#of "unless $game_party.actors[i].dead?"
end#of "for i in 0...$game_party.actors.size"
shinami_start_phase5
end#of aliased "def start_phase5"
end#of class Scene_Battle
Ok, guess the problem solved.
Thank for helping, Shinami.
Always a pleasure, never a chore.
thx everybody, the script works great. thx to all.
Add [Resolved] to the topic title to help others and do it by editing the title of your first post. ;D
@Shinami: How are things going in life? Syntax book? (Sorry to sound a bit self-centered T_T)