Custom Leave effect with Yanfly's Buffs & States Core

Hi there,

I just wanted to make sure my scripting here is correct, simple as it may be. I have this attached as a notetag to one of my states:

<Custom Leave Effect>

$game_switches[144] = true

</Custom Leave Effect>

My goal is to have the switch activate after the state expires, so is this correct?

It doesn't seem to be working.

Thanks.
Two things to consider:

1. $game_switches[144] = true

should actually be

$gameSwitches.setValue(144, true);

2. Custom Leave Effect only triggers when the state goes away because the timer ran out. If that's what you want, that's fine. If you want the switch to trigger when the state is removed by any means, you'll need <Custom Remove Effect>.
@shockra thanks so much.

And yes, that is the intended effect, but thank you for pointing that out just in case. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/custom-leave-effect-with-yanflys-buffs-states-core.94662/