YesNoOk
avatar

Character freezes when doing a shoryuken. (Read 20049 times)

Started by Mr. Nate, April 19, 2018, 12:15:01 am
Share this topic:
Character freezes when doing a shoryuken.
#1  April 19, 2018, 12:15:01 am
  • avatar
  • ***
  • Been toying with MUGEN since 2014
    • USA
I'm trying to program some new moves into Basara-kun's version of Thomas (Kung Fu), starting with a shoryuken. I managed to add in the sprite and animation just fine. However, programming is where I hit a snag.

After performing the animation, Thomas barely goes up into the air, thrusts forward instead of up, and after about a half-second, he stays stuck in the air in the falling sprite I put in the uppercut animation.

Animation: UPPERCUTT (anim: 1000)
Frame 1: sprite 1000,0 (time: 8)
Frame 2: sprite 40,1 (time: -1)

Example: https://imgur.com/YQBTija

Spoiler, click to toggle visibilty
If there are any problems, let me know. I will try to fix them as soon as possible.
Last Edit: April 19, 2018, 12:37:19 am by Mr. Nate
Re: Character freezes when doing a shoryuken.
#2  April 19, 2018, 12:26:47 am
  • *****
  • Shame on you!
    • USA
Spoiler, click to toggle visibilty

Frame 3: ?????????
Frame 4: ?????????

trigger1 = animelem = 3  ;This needs a 3rd frame. So does = 4.
You can duplicate Frame 2 and adjust the animations times as you need. Or you can switch the triggers to Time = 12 or whatever tic Thomas should be going up and turning to idle.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Character freezes when doing a shoryuken.
#3  April 19, 2018, 12:33:16 am
  • avatar
  • ***
  • Been toying with MUGEN since 2014
    • USA
Thank you! However, I still have the problem of Thomas not being able to move once he hits the ground. He at the very least goes back to his idle animation.
If there are any problems, let me know. I will try to fix them as soon as possible.
Last Edit: April 19, 2018, 12:37:07 am by Mr. Nate
Re: Character freezes when doing a shoryuken.
#4  April 19, 2018, 12:53:25 am
  • *****
  • Shame on you!
    • USA
[State 0, ChangeState]
type = ChangeState
trigger1 = statetype = A
trigger1 = pos y + vel y >= 0
value = 0
ctrl = 0    ;<<<<<No control is set here. Change it to 1
vVv Ryuko718 Updated 10/31/22 vVv
Re: Character freezes when doing a shoryuken.
#5  April 19, 2018, 01:28:24 am
  • avatar
  • ***
  • Been toying with MUGEN since 2014
    • USA
[State 0, ChangeState]
type = ChangeState
trigger1 = statetype = A
trigger1 = pos y + vel y >= 0
value = 0
ctrl = 0    ;<<<<<No control is set here. Change it to 1

Whoops. I'm new to Mugen programming. I'm just getting used to things and all.

One more thing. After landing, Thomas is standing on thin air. Does this have to do with the State mentioned above?
If there are any problems, let me know. I will try to fix them as soon as possible.
Last Edit: April 20, 2018, 12:59:04 am by Mr. Nate
Re: Character freezes when doing a shoryuken.
#6  April 19, 2018, 07:57:54 am
  • *****
  • Shame on you!
    • USA
So with a "landing" state, I usually like to do 2 things. I allow P1 to hold down and go straight into crouching, and I like P2 to be able to guard. I set this up in my landing states. Because you're landing an easy thing to do is switch it to your actual landing state. State 52. This will usually make it easier on you.

But yeah, you could add a posset so Y is set to 0 and you'd be good.
Give it the same exact triggers as your changestate.

One tip is you might want to organize your states in the actual order that they'll happen. You have your statetypeset above your hitdef, but the hit happens before it. In the long run it's good practice. Sometimes the order can actually mess up the way mugen figures everything out. It's extremely rare you have to have something that's figured out after something else above it. It's very common to need things in chronological order. Ctrl+X then Ctrl+V makes things easy.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Character freezes when doing a shoryuken.
#7  April 20, 2018, 01:10:29 am
  • avatar
  • ***
  • Been toying with MUGEN since 2014
    • USA
If there are any problems, let me know. I will try to fix them as soon as possible.
Re: Character freezes when doing a shoryuken.
#8  April 20, 2018, 08:55:09 am
  • *****
  • Shame on you!
    • USA
I have to admit I didn't read your changestate 100%. I saw that the things that are usually there, are there. What you have is wrong.

[State 0, ChangeState]
type = ChangeState
trigger1 = statetype = A
trigger1 = pos y + vel y >= 0
value = 0
ctrl = 0

needs to be

[State 0, ChangeState]
type = ChangeState
trigger1 = statetype != S ;you had it as air but never switched to air
trigger1 = vel y >= 0
trigger1 = pos y >= 0
value = 0
ctrl = 1

Adding the posset just before the changestate will not guarentee that P1 will be exactly at y = 0 too. You'll need to do a velset above the posset. Set the velocity y to 0, then the pos y to 0. You'd want to have
vVv Ryuko718 Updated 10/31/22 vVv