Skill learn sound

ScoopJohn

The guy who asks too many questions
Veteran
Joined
Sep 6, 2013
Messages
254
Reaction score
33
First Language
Italian
Primarily Uses
RMVXA
Hi guys, is there a scriptlet that lets you play a sound for everytime you learn a skill?
 

ScoopJohn

The guy who asks too many questions
Veteran
Joined
Sep 6, 2013
Messages
254
Reaction score
33
First Language
Italian
Primarily Uses
RMVXA

ScoopJohn

The guy who asks too many questions
Veteran
Joined
Sep 6, 2013
Messages
254
Reaction score
33
First Language
Italian
Primarily Uses
RMVXA

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
Here is a snippet for you:

class 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
Change the sound effect you want to play by editing the line below the comment line.

PS. You should not bump your topics that often. o.o
 
Last edited by a moderator:

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
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?)
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
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).
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top