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,265
Reaction score
1,034
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,812
Reaction score
9,117
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,265
Reaction score
1,034
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,660
Reaction score
2,252
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,265
Reaction score
1,034
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,660
Reaction score
2,252
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

I made a comic strip with the characters of my game.Flor en la cola eng.jpg
Hey, what does it mean in settings, privacy, where it says allow users to: view your identities??????????
I have returned yet again. No reason for my hiatus; just got distracted by video games and stuff. I figured out how to make a bootleg Ys 1 Battle system using in engine scripting (The only plugin enabled is the HUD thing).
Unfortunately I have no idea how to program but-stabbing as a crit without it being even more complicated to program so this is it.

Kickstarter successful!! I'm gonna have a Hot GameDev Summer in the trenches!
Me and my friend got into one of our usual discussions after I reccomended him a game, and I remember the last time we had a discussion like that, he disabled his FA account. This time, I found myself constantly checking my friends account hoping it wouldn't happen again. ...But it didn't.

The thing is... I just can't lie about my feelings, sometimes. :(

Forum statistics

Threads
122,047
Messages
1,146,114
Members
160,313
Latest member
bebeom1
Top