- Joined
- Aug 16, 2020
- Messages
- 2
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- RMXP
Couldnt find issue in script help forum and everyone for the post i found the below scripts from said everything worked perfect for them so im at a loss on what to do...
Sorry if this is stupid but im having issues getting my script for heal on level to work, i used a previous post to find the 2 scripts here and even tried altering it to make it stop giving me Line XXX syntax error codes. I tried copy paste both of these and get as syntax error at def level_up or i will get script 'Game_Actor line xxx: NameError occured
undefined method 'level_up' for class 'Game_Actor' and thats when i copy it/ type it by hand. ill post a screenshot of the location and look of the codes inside my script editor as well. Any help would be appreciated as im on the final stretch of my game and noticed thru extraneous play testing that my party ends up low on hp/mp before level up, i want to force healing items to be semi rare but i dont want to feel like the player is fighting an uphill battle in multi level dungeons etc with no heal points before bosses.
class Game_Actor < Game_Battler
alias heal_on_level_up level_up
#--------------------------------------------------------------------------
# * Level Up
#--------------------------------------------------------------------------
def level_up
heal_on_level_up
recover_all
end
end
class Game_Actor < Game_Battler
alias heal_on_level_up level_up
#--------------------------------------------------------------------------
# * Level Up
#--------------------------------------------------------------------------
def level_up
heal_on_level_up
@hp = mhp
@mp = mmp
end
end

this code as well as the recover_all causes the same undefined name error. to get rid of this i did this
but it causes the script to not work at all i.e: when any actor levels up their hp/mp do not restore nor do their states(poison etc.) get removed with recover_all script, recover_all also doesnt heal hp/mp its as if the script isnt active at all.
Sorry if this is stupid but im having issues getting my script for heal on level to work, i used a previous post to find the 2 scripts here and even tried altering it to make it stop giving me Line XXX syntax error codes. I tried copy paste both of these and get as syntax error at def level_up or i will get script 'Game_Actor line xxx: NameError occured
undefined method 'level_up' for class 'Game_Actor' and thats when i copy it/ type it by hand. ill post a screenshot of the location and look of the codes inside my script editor as well. Any help would be appreciated as im on the final stretch of my game and noticed thru extraneous play testing that my party ends up low on hp/mp before level up, i want to force healing items to be semi rare but i dont want to feel like the player is fighting an uphill battle in multi level dungeons etc with no heal points before bosses.
class Game_Actor < Game_Battler
alias heal_on_level_up level_up
#--------------------------------------------------------------------------
# * Level Up
#--------------------------------------------------------------------------
def level_up
heal_on_level_up
recover_all
end
end
class Game_Actor < Game_Battler
alias heal_on_level_up level_up
#--------------------------------------------------------------------------
# * Level Up
#--------------------------------------------------------------------------
def level_up
heal_on_level_up
@hp = mhp
@mp = mmp
end
end

this code as well as the recover_all causes the same undefined name error. to get rid of this i did this
but it causes the script to not work at all i.e: when any actor levels up their hp/mp do not restore nor do their states(poison etc.) get removed with recover_all script, recover_all also doesnt heal hp/mp its as if the script isnt active at all.
Last edited:


