pestilence
Member
In RMXP, is there a way you could play a noise each time a character leveled up?
Would this require scripting?
Thanks in advance.
Would this require scripting?
Thanks in advance.
class Window_BattleStatus
#--------------------------------------------------------------------------
# * Set Level Up Flag
# actor_index : actor index
#--------------------------------------------------------------------------
def level_up(actor_index)
@level_up_flags[actor_index] = true
sound = RPG::AudioFile.new("LevelUp")
$game_system.me_play(sound)
end
end
FAQ":atodpmcz said:If there were no installation directions provided or the ones that were, seem vague. Do as follows. First open your project, then your script editor(F11, the shortcut key). Insert an empty section in the script listing by right clicking 'Main' and selecting 'Insert'. Copy the text from the custom script document you want to install. Paste this code that was just copied into the large empty section on the right known as the code panel. Lastly go back to the listing of script on the left and name the section something informative and memorable for the script.
A picture of where your script will most likely go:
http://i229.photobucket.com/albums/ee31 ... cement.png[/img]
pestilence":1xx2i543 said:I found this post (from you)
Paste above main:
Change "LevelUp" to the name of your sound effect, without the extension.Code:class Window_BattleStatus #-------------------------------------------------------------------------- # * Set Level Up Flag # actor_index : actor index #-------------------------------------------------------------------------- def level_up(actor_index) @level_up_flags[actor_index] = true $game_system.se_play("LevelUp") end end
Make sure the SE is in your game SE folder, or in the RTP.
Be Well
But (even though you say) I don't know where to put the script =/
Brewmeister":m6rvrg3g said:Try changing "se_play" to "me_play", and put the file in the ME folder.
class Window_BattleStatus
#--------------------------------------------------------------------------
# * Set Level Up Flag
# actor_index : actor index
#--------------------------------------------------------------------------
def level_up(actor_index)
@level_up_flags[actor_index] = true
sound = RPG::AudioFile.new("LevelUp")
$game_system.me_play(sound)
end
end