Advertiser Content
Seen 4 Days Ago
Posted October 6th, 2019
6 posts
1.1 Years
I have different ME sounds for standard items, key items, and TMs, but whenever I pick up an item ball, it still plays the original item ball ME sound.
I want to deactivate the original ME sound, and replace it with one of the new sounds depending on what type of item is picked up.
If the original ME was silenced, I could just use the 'play ME' event command to play the new ME, but I don't know how to do that.


Seen 12 Hours Ago
Posted 1 Week Ago
971 posts
4.3 Years
You'll want to edit def Kernel.pbItemBall and def Kernel.pbReceiveItem. Those two methods are in the bottom of PField_Field.
Don't get overwhelmed by the code, as it's not too bad. We just need to add a couple more elsifs like how TMs/HMs are done.
Key items are checked with pbIsKeyItem?(item), so a simple code block like
  elsif pbIsMachine?(item)   # TM or HM
    Kernel.pbMessage(_INTL("\\me[TM get]You obtained \\c[1]{1} {2}\\c[0]!\\wtnp[30]",itemname,PBMoves.getName(pbGetMachine(item))))
  elsif pbIsKeyItem?(item)   # Key Item
    Kernel.pbMessage(_INTL("\\me[Key Item get]You obtained the \\c[1]{1}\\c[0]!\\wtnp[30]",itemname))
Similar idea for the rest.
The \\me[Item get] works the same way as the regular message stuff, so you just stick the filename in the brackets, and it'll play your ME, no problem!

I'll leave you with this, for you to experiment with, and feel free to ask for clarification if need be.

Advertiser Content