Hi guys, is there a scriptlet that lets you play a sound for everytime you learn a skill?
Skill learn sound
● ARCHIVED · READ-ONLY
-
-
Bump
-
Bump
-
Here is a snippet for you:
Change the sound effect you want to play by editing the line below the comment line.Spoilerclass Game_Actor < Game_Battler alias add_learn_se8875 learn_skill def learn_skill(skill_id) unless skill_learn?($data_skills[skill_id]) # ("filename",volume,pitch) # [switch ID] RPG::SE.new("Sword4",80,100).play if $game_switches[400] end add_learn_se8875(skill_id) end end
PS. You should not bump your topics that often. o.o -
I want to use this, but I noticed a weird bug: it also plays the sound effect when you're loading a file. (I'm using the Yanfly Save Engine, so maybe it's an incompatibility with that?)
-
Wow, never thought that would be an issue. o_O
It happens because the 'learn_skill' method is run at the initialization of the actors.
I edited the snippet to not play any sound effect unless a switch is turned ON. This way it won't trigger the sounds until you turn the switch ON.
You can change the switch ID where I marked it (it is set to 400 in the snippet).