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

Joined
Mar 17, 2020
Messages
41
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
334
Reaction score
103
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
645
Reaction score
278
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
785
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
41
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

I've spent some cash on foley and other sound effects. I wonder sometimes if I made a poor choice, but I remember that I really want to improve the sound of my games. n...n; My frugalness haunts me sometimes.
elex 50s face.png

Experimenting with an old 50's style face set. I have done about a dozen variations of face sets for my characters, but am never happy with the results for very long. Different attempts. Second one is the same character as the first image. The third is Ivan, another character entirely.
treele.jpg
A them/they in a forest... a still for the game I'm working on.

Forum statistics

Threads
108,843
Messages
1,039,987
Members
141,307
Latest member
ZeroJyllmeiko
Top