Is it possible to make it so that a state, when inflicted, automatically cancels other states?

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,303
Reaction score
1,052
First Language
French
I would like to do it through the State directly, not a skill doing for instance:
Add State X
Remove State Y

More like, when (or if) the State X is inflicted, State Y is automatically cancelled.
I recall it was possible to do this on XP but not sure about MZ.
 

LunarWingCloud

Villager
Member
Joined
Aug 23, 2013
Messages
23
Reaction score
10
First Language
English
Primarily Uses
I might be wrong but I think you can just add a State Resist on that state for the one you want to have be cancelled?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,814
Reaction score
9,142
First Language
Indonesian
Primarily Uses
RMVXA
LunarWingCloud is right, state resistance can actually cancel the resisted states. But the drawback is it is also resisting the state. So you can't have X cancels Y AND Y cancels X OR reapply Y.

I believe VS has a function to execute custom code when a state is applied. You can try to play around with that.
 

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,303
Reaction score
1,052
First Language
French
So you can't have X cancels Y AND Y cancels X OR reapply Y.

Yep, I'd like this exactly.
Eg:
Inflicting Wet cancels Burning.
But inflicting Burning cancels Wet.
And so on.
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,764
Reaction score
2,309
First Language
English
Primarily Uses
RMMV
Yep, I'd like this exactly.
Eg:
Inflicting Wet cancels Burning.
But inflicting Burning cancels Wet.
And so on.
Sounds pretty doable to me, tbh. Apologies since I don't use MZ, but in MV you can just use a <Custom Apply Effect> note-tag and then add conditionals to check if x state is applied; if so, do x, else do y. Then it's just a matter of using target.addState(n); or w/e you want to happen. At least that's how I imagine it in my head lol. Unfortunately, I'm away from my PC atm so I'm not able to confirm this rn.
 

Indinera

Indie Dev
Veteran
Joined
Mar 13, 2012
Messages
2,303
Reaction score
1,052
First Language
French
Thanks. I looked into it and this should be this:

<JS On Add State>
code
</JS On Add State>

Which code should I use to remove state X to the target?
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,764
Reaction score
2,309
First Language
English
Primarily Uses
RMMV
Thanks. I looked into it and this should be this:

<JS On Add State>
code
</JS On Add State>

Which code should I use to remove state X to the target?
target.removeState(n);
edit: Again, apologies if MZ is different.
 

Latest Threads

Latest Posts

Latest Profile Posts

Messing around with fragment shaders (filters). This thing is HUGE and I'm surprised almost no one makes good use of. Even the number of plugins that do this stuff are limited.
ScreenShot_6_28_2022_3_2_40.png

There's 7 main areas in the game that are all connected. This train get's you from an underground lab to the center of someone's subconscious. inside the train you can talk to some of the passengers. but going to the top of it, there's battles.
Speedrunning all character portraits just so they all have the same quality. Not sure if this was a good idea, but now I'm almost done.
We now have a gameplay video!
DrBuni wrote on Akiritas's profile.
That is a cute Link picture, reminds me of the Samurai Jack artstyle.

Forum statistics

Threads
123,147
Messages
1,154,395
Members
161,495
Latest member
dstroya
Top