Hey people. Not sure if this is the right section as is more of a discussion, but I have some doubts, and is about coding characters, so... I thought on posting it here.I have a brief knowledge of how states -2 and -3 works, but I want to make sure that I'm using them correctly.Basically, -2 are executed all the time and constantly, while -3 are executed when in a specific state of your choice, right? Examples:If you want a certain explod to appear on some special moves (say, states 1000, 1100 and 1200), it would be better coded at -3, using triggerall = !NumExplod(x) and trigger1 = StateNo = 1000, trigger2 = StateNo = 1100, trigger3 = StateNo = 1200, instead of coding it individually on these states.Now if you want a pal fx, or an afterimage, anything like this that you want your character to use all the time, even when being hit or in custom states, these would be better coded at -2, using trigger1 = 1.Are these correct? Am I missing something? Are there any better examples for the usage of these 2 states?I'm asking because sometimes I don't know where would be better to use a specific code, as it could be done in any of the 2.
The first thing that comes into mind is that custom states deny you from using statedef -3 since you're in P2's state now, therefore, you can only access statedef -2 since those don't care which state that you're in. So, if you want an explod to appear while you're in hitstun, don't use statedef -3 since there is a chance that the hitstate you may be in could be p2's custom state and the explod will never appear as a result. My main use for statedef -3 is to prevent any clutter in statedef -2 since my characters usually have enormous sections of coding in the latter, so, I can reduce that by putting them in statedef -3 to make my coding easier to read if they only occur in my own characters' states.
This is in the docs but Statedef -3 read first. Doesn't get read in custom statesStatedef -2 read second on every tickStatedef -1 read third. Normal statesHelper statesNote that helpers have no access to state -3 or -2 unless you stupidly use helpertype = player. They only get access to -1 if keyctrl = 1 when helpertype is normal.
Dude, no offence, but for a CotM winner I expected you would at least know the difference on -2 and -3 states and how/when to use them
XGargoyle said, October 11, 2019, 10:52:52 amDude, no offence, but for a CotM winner I expected you would at least know the difference on -2 and -3 states and how/when to use themNo offence to anyone but for someone who has been here this long, you should have known that CoTM is just a popularity contest, not "who has the fanciest code" right? You probably want to lower your bar for CotM winners though as we have a lot of more questionable winners before.Also, while this is in the docs, the question can't be searched easily on any search engines so it doesn't really hurt to have someone to ask it.
XGargoyle said, October 11, 2019, 10:52:52 amDude, no offence, but for a CotM winner I expected you would at least know the difference on -2 and -3 states and how/when to use themNo offence, but did you even read my post? I already know how it works, I'm just asking for more information about them, I've read the docs a hundred times, but there is no in depth information about them, there is just a plain explanation, someone with more experience could know a few more things that I don't know.And I've seen CotM winners asking dumber questions, those that you can learn by reading KFM's codes. And? The CotM makes no difference to anyone.
XGargoyle said, October 11, 2019, 10:52:52 amDude, no offence, but for a CotM winner I expected you would at least know the difference on -2 and -3 states and how/when to use themyou have always been a butthurt individial, mr mugen beta
Cyanide said, October 11, 2019, 09:50:41 amThis is in the docs but Statedef -3 read first. Doesn't get read in custom statesStatedef -2 read second on every tickStatedef -1 read third. Normal statesHelper statesNote that helpers have no access to state -3 or -2 unless you stupidly use helpertype = player. They only get access to -1 if keyctrl = 1 when helpertype is normal.the only additional info outside of ^ this is that -1 is a required statedef. -2 and -3 are not required.as an example if you wanted to break out of a custom state you would set a selfstate in -2. -1 and -3 will do nothing in this regard.i personally didn't learn the differences between them through the docs and it took me quite some time to decipher them.
Thank you for that. I knew there was an extra reason for -1 but couldn't for the life of me remember what it was.
Thanks everyone for the replies. If anyone wants to add more feel free to do so, any info will be welcome.