News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Change state working from directional keys?

Started by Noctis, March 21, 2012, 04:13:06 AM

Previous topic - Next topic

Noctis

;-| Burst |------------------------------------------------------------------
[State -2, Burst]
type=selfstate  ;;  you will very likely change into an invalid state with changestate ( because you're in p2's states: change=theirs, self=yours )
value=1001
trigger1=alive
trigger1=stateno!=[120,169]
trigger1=var(39)<4
trigger1=var(50)=0
trigger1=var(2)!=gametime*1234567891011121314151617181920||movetype=h
trigger1=command="burst"
ctrl = 0
ignorehitpause=1


This is the burst state that I got from the help of 20S and Cyanide. Now, I made another character with the same base (effects, sounds, custom gethit states, mechanics) and I tweaked them around a little bit, but now for some reason, I go into the burst state from a gethit state just by pressing the directional keys. It works automatically just by pressing forward (which ever way I'm facing).
I have absolutely no idea why and would hope someone could give me an idea of what's wrong.

If it helps, this the burst for the AI.

;-| Burst |------------------------------------------------------------------
[State -2, Burst]
type=selfstate  ;;  you will very likely change into an invalid state with changestate ( because you're in p2's states: change=theirs, self=yours )
value=1001
trigger1=var(39)<4
trigger1=var(50)=1
trigger1=var(2)!=gametime*1234567891011121314151617181920||movetype=h
trigger1=Random<5
trigger1=stateno!=[120,169]
ctrl = 0
ignorehitpause=1


The var(50)=1 prevents anyone but the AI from using it.

I'm looking through whatever I tweaked with, but I'm not see any problem. --;

Edit:
Uhh....when my Rouga sends my other character into a custom state and I press forward, I go into my burst. I don't understand why pressing forward during any custom state sends me into my burst.
Also, my "burst" command doesn't work. It's only the directional keys.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Speedy9199

For your 1st sentence, no, there is no way to break out of a custom state unless in Player 2's custom state they make this possible.

For you 2nd and 3rd sentace. You would have to do another change state to make it compatible with all your opponents and in the new state have something common in all characters and use that to give them what you want. Don't use "trigger1 = command = "burst"" because no other mugen character will have that in thier cmd. use a more common command.
The answer to most of your mugen problems is to know more math.

How can you get the "feel" of a character if you are only touching a keyboard or controller?!?!

Veolf

Quote from: Speedy9199 on March 21, 2012, 04:32:36 AM
For your 1st sentence, no, there is no way to break out of a custom state unless in Player 2's custom state they make this possible.

For you 2nd and 3rd sentace. You would have to do another change state to make it compatible with all your opponents and in the new state have something common in all characters and use that to give them what you want. Don't use "trigger1 = command = "burst"" because no other mugen character will have that in thier cmd. use a more common command.

Um speedy, he meant he may have to use those triggers to make the move work for himself, but I doubt you have control during custom states, so the command is useless in the first place. You can prob do a stateno = p2stateno trigger though.

2OS

Quote from: Speedy9199 on March 21, 2012, 04:32:36 AM
no, there is no way to break out of a custom state unless in Player 2's custom state they make this possible.

This is absolutely false ignore this.


I have a question based on the code posted: Are you trying to detect when you're in custom states in general ?

Speedy9199

Quote from: Dubstephen King on March 21, 2012, 04:38:25 AM
Quote from: Speedy9199 on March 21, 2012, 04:32:36 AM
For your 1st sentence, no, there is no way to break out of a custom state unless in Player 2's custom state they make this possible.

For you 2nd and 3rd sentace. You would have to do another change state to make it compatible with all your opponents and in the new state have something common in all characters and use that to give them what you want. Don't use "trigger1 = command = "burst"" because no other mugen character will have that in thier cmd. use a more common command.

Um speedy, he meant he may have to use those triggers to make the move work for himself, but I doubt you have control during custom states, so the command is useless in the first place. You can prob do a stateno = p2stateno trigger though.

Well he hardly posted any info to help with and mybe I misunderstood  :(

Quote from: 2OS on March 21, 2012, 04:38:54 AM
Quote from: Speedy9199 on March 21, 2012, 04:32:36 AM
no, there is no way to break out of a custom state unless in Player 2's custom state they make this possible.

This is absolutely false ignore this.

There is? why would you be able to do this not from some glitch or something?

The answer to most of your mugen problems is to know more math.

How can you get the "feel" of a character if you are only touching a keyboard or controller?!?!

Speedy9199

#5
Ok now I understand his post more, it's just the second sentence seemed odd to me. well anyway the "trigger1 = stateno != [0,1024]" will not work well, even from my coding experiences. This will only really work if the character is in a closed mugen game or something like that. And pretty much every other custom state doesn't give you control making every command useless.

Quote from: 2OS on March 21, 2012, 04:38:54 AM
Quote from: Speedy9199 on March 21, 2012, 04:32:36 AM
no, there is no way to break out of a custom state unless in Player 2's custom state they make this possible.

This is absolutely false ignore this.

Oh what, 2OS do you mean you cannot at all break out or IS there a way? Your post confuses me  :???:  You CAN give your opponent attacks while the opponent is in a custom state. It's possible, however I have only seen it in one mugen character though.

The answer to most of your mugen problems is to know more math.

How can you get the "feel" of a character if you are only touching a keyboard or controller?!?!

Noctis

#6
Ah, sorry guys.
I'll explain fully.

The attack is a burst like in Guilty Gear or BlazBlue. I want to instantly change my state to my Burst even if I'm in a custom gethit state.

I have stateno != [0,1024] because, all of those states are the basics, attacks, and specials and I don't wanna use it while in those states (I changed it to movetype = H because I realized that would of had problems in the future). The custom gethit states are from 1025 to 1099 basically if it's important to know.
It works perfectly for regular gethit states, just not the custom ones.

I said I could use name and author,name if I decided to put the changestate in my custom gethit states to prevent other characters besides my own character from using the changestate. I just don't want to because, as I said before, I have like 74 custom gethit states.

EDIT:
Shiiiiit. I forgot about the facing.
A little off topic, but why the hell does FF keep spawning 2-3 explods when I specifically have it only spawning one?
It's in my -2 state. I don't remember if it belongs in -3 or -2, but I tried both and it still spawns like 2-3 explods.


[State -2, Explod]
type = Explod
trigger1 = NumExplod(6500) = 0
anim = 6500
ID = 6500
pos = 65,235
bindtime = -1
postype = left
scale = .25,.25
removetime = -1
sprpriority = 7
ownpal = 1

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

2OS

There are several ways to break out of custom states and I know the best way.


Statedef -1 and -3 only execute in non custom states ( selfs states )

Statedef -2 ALWAYS executes


http://mugenguild.com/forumx/index.php?topic=125606.msg1441563#msg1441563


[Statedef -3]

[State ]
type=varset
trigger1=1
var(2)=gametime*1234567891011121314151617181920
ignorehitpause=1

[Statedef -2]

[State -2, Burst]
type=selfstate  ;;  you will very likely change into an invalid state with changestate ( because you're in p2's states: change=theirs, self=yours )
value=1001
trigger1=var(2)!=gametime*1234567891011121314151617181920||movetype=h
trigger1=power>=1500
trigger1=command="burst"
ignorehitpause=1


Because Statedef -3 isn't read in custom states, the variable will stop being equivalent to that absurdly large persistently changing ( every tick ) value I typed. It will resume being equivalent when you're back in your own states.

You will selfstate out of any custom state or hit state with this and it is absolutely fail proof under normal circumstances.

A glitch will cause it to fail but you'll never see it happen because it's a hardcore nuke thing.

Cyanide

Although the above is fine, simply movetype = H would let you break out of ANY custom hitstate regardless of anything unless the person made it movetype = I for some reason.

Your original code wouldn't work mostly because people use a variety of states for custom and very commonly in the [800,999] series which is catered for in your first range. Basically, you'd said "don't allow me out of custom states"

Above method will guarantee it working in custom states OR default hitstates.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Noctis

I knew the movetype = H would work fine, but I never thought of putting it in my -2 state.
Okay, I understand. Thank you a lot.
On a side note, I got the ridiculous explods working as well. I've ALWAYS had trouble getting these damned -2 explods working correctly (custom bars and crap). Fighter Factory is not dyslexia friendly. :P

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Speedy9199

#10
Also about that code, only apply it to a closed mugen game(which seems like what your doing). The only time you would apply something like that to global mugen would be if you want to create a mugen "nuke" character. Being able to get out of everything even custom states is not a good thing. For example, your opponent grapples you and you break out, most characters for their grapples don't have blue clsns when doing the grapple so the combo breaker won't effect them. You get out of the attack, but won't be able to attack back(most of the time).

Quote from: 2OS on March 21, 2012, 06:01:08 AM
You will selfstate out of any custom state or hit state with this and it is absolutely fail proof under normal circumstances.

Also 2OS, what are the "not" normal circumstances when this doesn't apply?  :???: can you give an example? This code seems unstoppable...

The answer to most of your mugen problems is to know more math.

How can you get the "feel" of a character if you are only touching a keyboard or controller?!?!

2OS

Yea it's definitely terrible for balanced chars unless you use it within reason, but using it for Burst is pretty reasonable IMO because it requires quite a bit of power and a command rather than just auto triggering.

If you use this to break out of something and you can't attack back it's because the state you selfstated to has no ctrl or you didn't give the selfstate ctrl=1.

Quote from: 2OS on March 21, 2012, 06:01:08 AM
A glitch will cause it to fail but you'll never see it happen because it's a hardcore nuke thing.

This is the not normal bit.

The most advanced version of the F1 killing glitch can bypass this code. I have absolutely no idea or desire to know how because I've quit the nukewar for good. It has grown to be more stupid than interesting.

Noctis

Quote from: Speedy9199 on March 21, 2012, 03:49:00 PMmost characters for their grapples don't have blue clsns when doing the grapple so the combo breaker won't effect them. You get out of the attack, but won't be able to attack back(most of the time).

I didn't think of that, but I don't consider it a major problem. If anything, they should give their grabs a blue clsn, but add a nothitby so it can't be hit by most attacks, only certain ones. Like a special.

Also, he's not the least bit cheap, I assure you. I wasn't sure if it should cost half his power or make something like blazblue (only two bursts), so I went with blazblue. Only difference is, you can use it 4 times. If that's not good enough, how about only 4 uses, and it costs about 500 power?

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Noctis

I hit a problem with Burst. Look at the first post.

I didn't make a new topic because it would be like making two of the same topics in my opinion.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Cyanide

Could be anything. You could have more than one burst. You could have some other "go into 1001" changestate. What you have is not really enough information. And i don't know what your burst command looks like and if it's even formatted or timed correctly.

When a command doesn't work, in the same way as when triggers don't work you make them simpler.

Make the command "a". Make the triggers something easy like trigger1 = alive then test. Make it more complicated and see when it breaks. Simple troubleshooting. Come back when you've pinpointed the problem.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Noctis

#15
I think I've pinpointed it somewhat.
It's not a changestate or anything related to that. It's not the state number either or multiple states with the same number. It's not multiple commands. It's not the AI burst or any vars. It's not the opponents custom states interfering with it.
It's the command itself. I just changed it to "a" and only "a", and it doesn't work unless I press "c".... :???: :???:
I checked my button remap and all my commands and its all in order. Something is switching my commands around and I'm really confused. Haha, wow. What the hell did I do?

Edit:
Found it. I still have no idea why, but my AI commands changed my commands around for some reason. I'll just remove that little ol' "var(50)=0" trigger and wonder why it f'ed up my commands.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Noctis

#16
Okay. That wasn't it. It worked at first, but now it's messing up again. And I don't understand why it worked at first, either.
--;

Long story short, my commands are switched around only when I'm using Burst. Then again, I'm in a gethit state before burst, so my commands must be getting switched around during a gethit state for some reason.

Alright, I pinpointed it some more. It's definitely because of my Rouga. He is somehow interfering with my character. The only thing I can really do so you guys can help me is to post the characters themselves because I'm at a complete loss, but I doubt anyone's willing to look through them. But, if you are, let me know and I'll post them.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Cyanide



In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Noctis

#18
No, he doesn't. His commands work correctly.

Edit 1:
Ahhhh, I think I found it for sure this time. It's my AI commands. They're somehow interfering with my commands. It might be the commands that aren't being used as a trigger.
Would that interfere with my commands possibly? AI commands that aren't being used for anything and are just sitting there wasting space?

Edit 2:
Oh my god... Now that I removed those commands, the correct command works perfectly now, only problem now is that it doesn't work during a gethit state unless I'm touching the ground.
When Rouga attacks Rouga, it works perfectly fine, but when Rouga attacks my other character and vice versa, it's ground only.
:bigcry:
And obviously, it's during a custom gethit state only.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Cyanide

Once more simplify. Recreate the whole attack if you have to.

Shit by including AI before you're even DONE (stupid idea by the way) you introduce variables that are not 100% under your control unless you remove them completely.

For example, why do you have var(50) = 0 on the variable set, but var(50) = 1 for the AI? It will never correctly take effect that way. Take AI out of it, take everything out except the MINIMUM required to make it work. You've said it only works on the ground, in that case you have something that breaks you in air states, so test with a simple command while jumping and follow the debug. See what state you go to if you do the command in the air. If you don't go to any state then your changestate is bad.

You are asking for a fix to a move you have integrated REALLY thoroughly into the character. You have other stuff that could be interfering and we have no idea what it is. TROUBLESHOOT. Cut things down, make them easy FORCE them to work.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.