Yanfly Buffs States Core - Custom Remove Effect

jayholden

Veteran
Veteran
Joined
May 30, 2015
Messages
35
Reaction score
3
First Language
English
Primarily Uses
Hi, I'm trying to use Lunatic Mode on Yanfly's Buffs State Core plugin to apply state 2 after state 1 ends. Here's what the plugin documentation says:

<Custom Remove Effect>
code
code
</Custom Remove Effect>

I'm not sure exactly what goes in the code section. I know it's supposed to be javascript, but I don't know where to go to learn what to add. So far I've found this document and tried:

$gameActors.actor(actorId).addState(14);
this.actor.add_state(14);
a.add_state(14);
user.add_state(14);
target.addState(14);

My best guess is that I'm using the wrong code to refer to the affected actor.
 
Last edited:

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV
After it ends, or after it's removed? Because there's a difference. If you want this to happen when the state is removed by any means, <Custom Remove Effect> is right. But if you want this to happen ONLY when the state expires through time, you want <Custom Leave Effect> instead.

Either way, within the state code, it should be:

user.addState(14);
 

jayholden

Veteran
Veteran
Joined
May 30, 2015
Messages
35
Reaction score
3
First Language
English
Primarily Uses
It worked!! Thanks so much.

Custom remove effect is what I intend, but thanks for the heads up.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top