You can use this if you want to make something happen at the end of battle:
class Scene_Battle
#--------------------------------------------------------------------------
# * Alias definitions
#--------------------------------------------------------------------------
alias raven_battle_end battle_end
#--------------------------------------------------------------------------
# * Battle Ends
# result : results (0:win 1:lose 2:escape)
#--------------------------------------------------------------------------
def battle_end(result)
raven_battle_end(result)
if result == 0
$game_variables[25] += 1
end
end
end
First i aliased so that we don't overwrite the old code. Then i called the old code with this line :
You can make something happen if the result at the end of the battle is either win, lose or escape.
Here is how you check the result:
#Win
if result == 0
#do winning stuff
end
#Lose
if result == 1
#do losing stuff
end
#Escape
if result == 2
#do escaping stuff
end
and if you only want something to happen at the end of the battle in general, you just skip the if statements, like this:
class Scene_Battle
#--------------------------------------------------------------------------
# * Alias definitions
#--------------------------------------------------------------------------
alias raven_battle_end battle_end
#--------------------------------------------------------------------------
# * Battle Ends
# result : results (0:win 1:lose 2:escape)
#--------------------------------------------------------------------------
def battle_end(result)
raven_battle_end(result)
#do your stuff here
end
end
Anyways, i hope that helped! :thumb:
Over and out - Gando