Can I add a new state right after another one ends?

Joined
Mar 17, 2020
Messages
43
Reaction score
74
First Language
Spanish
Primarily Uses
RMMV
Hello. I'm planning to implement an item in my game that makes a character hyperactive, rising their states (like the invincible lollipops from Kirby) for 5-7 turns, and then adding an adverse effect that makes the same character confused and weak for some turns.
Is it possible to make it so right after the invincible state dissapears, the character is affected with the confused state?
Any help would be appreciated.
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
335
Reaction score
105
First Language
English
Primarily Uses
RMMV
it is possible, although I can't recall with which plugin. it's something I have, because I do this in my game.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
658
Reaction score
283
First Language
english
Primarily Uses
RMMV
yanfly buff/state core
<Custom Leave Effect>
user.addState(X)
</Custom Leave Effect>
The code in between these notetags will run when the state is removed from
a battler due to turn decay. The code will process after the state is
actually removed and after <Custom Remove Effect>.

depending on the exact conditions you want triggering the new state you might use a different notetag. this tag only adds the new state if the state with this tag fades naturally. this tag wont add the new state if this state is cure by items or skills. (this 1 i used for death sentence and gradual petrify type states) this 1 should be good for your example.
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
795
Reaction score
410
First Language
German
Primarily Uses
RMMV
if thats only supposed to happen on actors, than you can make an own switch for each actor which gets activated with the item(which activates the "invincible lollipop_state") usage ..
and if switch is on but "invincible lollipop_state" is off, an common event will set the related switch off and confusion state on..
this solution needs no extra plugins, but if you use a lot of actors that would need a lot of switches..

edit
( it should be possible to build a little plugin that stores these conditions in the "game battler", than no Game_switches or CommonEvents would be needed and it should work on all battlers )
 
Last edited:
Joined
Mar 17, 2020
Messages
43
Reaction score
74
First Language
Spanish
Primarily Uses
RMMV
yanfly buff/state core
<Custom Leave Effect>
user.addState(X)
</Custom Leave Effect>
The code in between these notetags will run when the state is removed from
a battler due to turn decay. The code will process after the state is
actually removed and after <Custom Remove Effect>.

depending on the exact conditions you want triggering the new state you might use a different notetag. this tag only adds the new state if the state with this tag fades naturally. this tag wont add the new state if this state is cure by items or skills. (this 1 i used for death sentence and gradual petrify type states) this 1 should be good for your example.
It worked! Thank you so much :)
 

Latest Threads

Latest Profile Posts

Wondering how big I can make Dorothy's skill menu before the game just becomes irredeemably bad.
Studio Blue is playing the RPG Maker game Phil Alone live now! Phil may be alone, but you don't have to be, come join us in chat!

I'm in desperate need of environment sprites and tilesets for my game. If anyone is interested please DM me im willing to pay.
All badges and prizes for the Let's Make a Scene Heart Edition event SHOULD be out. If you participated and haven't received either or both, send me a PM.

Forum statistics

Threads
109,207
Messages
1,043,063
Members
141,722
Latest member
Viabraxas
Top