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

Joined
Mar 17, 2020
Messages
42
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
652
Reaction score
280
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
787
Reaction score
400
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
42
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

Tarzanthecat wrote on hiddenone's profile.
THANK YOU SO MUCH HIDDENONE ADSKFSJDFSKDF
Another unscheduled stream for Lightestone~ this time because we hit affiliate! Aaaahh- So other than the game we're also going to work on emotes/badges/etc!

www.twitch.tv/riazey
Is it necroposting if I ask for more info in my own months old thread? All the information in the thread is relevant

Forum statistics

Threads
108,977
Messages
1,040,989
Members
141,436
Latest member
LOLOLBD
Top