Sound Effect for States

Hello,
Is it possible to add a sound effect when a character (either enemy or party actor) is afflicted with a state?
I would like to be able to also alert the player with sounds that the state has been activated.
From what I can gather, you're using YEP Buffs and States core, correct?


Going from the javascript section here, you can specify something like by using the <Custom Apply Effect> notetag which will trigger whenever the state is applied.

So for example if you wanted a sound effect to play, it'd be:

Code:
<Custom Apply Effect>
AudioManager.playSe({ name: "Ice3", volume: 90, pitch: 100});
</Custom Apply Effect>

Which in this instance would play the sound effect Ice3, and you'd tweak the parameters to your liking, not needing to add the .ogg extension or anything.
From what I can gather, you're using YEP Buffs and States core, correct?


Going from the javascript section here, you can specify something like by using the <Custom Apply Effect> notetag which will trigger whenever the state is applied.

So for example if you wanted a sound effect to play, it'd be:

Code:
<Custom Apply Effect>
AudioManager.playSe({ name: "Ice3", volume: 90, pitch: 100});
</Custom Apply Effect>

Which in this instance would play the sound effect Ice3, and you'd tweak the parameters to your liking, not needing to add the .ogg extension or anything.
It worked, thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/sound-effect-for-states.169542/