YesNoOk
avatar

Character floating after perform statedef 200 in the air (Read 1132 times)

Started by Slaker, May 23, 2024, 08:10:10 pm
Share this topic:
Character floating after perform statedef 200 in the air
#1  May 23, 2024, 08:10:10 pm
  • avatar
    • Brazil
Hi, guys!

So, I have a problem with my M.U.G.E.N character: Every time I perform any air state (shoryuken, and jumps to any direction) and perform the state 200 (light punch in my case) in the air, the character floats like if it was in the state 0. Not to mention, it's supposed to perform the state 600 (jump light punch in my case), but it performs statedef 200 like I said, and after that it gets stuck in the air. I've tried a lot of things like change the physics or something like that, but none of that worked, unfortunately... So, I'm a beginner in M.U.G.E.N. so I hope my doubt is not that silly for you guys, here goes the codes for the state defs I mentioned:

;Jump Light Punch
[Statedef 600]

type = A
movetype= A
physics = A
juggle = 3
poweradd= 11
ctrl = 0
anim = 600
[State 600, 2]
type = HitDef
trigger1 = Time = 0
attr = A, NA
damage = 20
guardflag = HA
priority = 3
pausetime = 7,8
sparkno = 0
sparkxy = -10,-58
hitsound = s1, 51
guardsound = 6,0
ground.type = High
ground.slidetime = 5
ground.hittime = 8
ground.velocity = -4
air.velocity = -1.3,-3
air.hittime = 14
[State 600, 5]
type = CtrlSet
trigger1 = Time = 20
value = 1
;Light Shoryuken:
[Statedef 5310]

type = S
movetype= A
physics = A
juggle = 1
;Commonly-used controllers:
velset = 3,-6
ctrl = 0
anim = 5310
poweradd = 20
sprpriority = 3
[State 5310, 1]
type = HitDef
trigger1 = animelem = 2
attr = A, NA
damage = 15, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 6, 6
sparkno = 0
sparkxy = -10, -76
hitsound = s1, 52
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
;Strong Shoryuken:
[Statedef 5311]

type = S
movetype= A
physics = A
juggle = 1
;Commonly-used controllers:
velset = 4,-7
ctrl = 0
anim = 5311
poweradd = 20
sprpriority = 3
[State 5311, 1]
type = HitDef
trigger1 = animelem = 2
attr = A, NA
damage = 15, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 2, Hit
pausetime = 6, 6
sparkno = 0
sparkxy = -10, -76
hitsound = s1, 52
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
;Standing Light Punch
[Statedef 200]

type = S
movetype= A
physics = S
juggle = 1
;Commonly-used controllers:
velset = 0,0
ctrl = 0
anim = 200
poweradd = 20
sprpriority = 3
[State 200, 1]
type = HitDef
trigger1 = Time = 0
attr = S, NA
damage = 23, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 6, 6
sparkno = 0
sparkxy = -10, -76
hitsound = s1, 51
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
[State 200, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
Re: Character floating after perform statedef 200 in the air
#2  May 23, 2024, 11:47:10 pm
  • ****
    • crepa.neocities.org
What is the code for the changestate to state 600 and state 200 in the CMD?
Check if the changestate to state 200 has a StateType = S or StateType != A
I also noticed you don't have chagestate to landing states... this can cause your char to sink into the ground.
Re: Character floating after perform statedef 200 in the air
#3  May 24, 2024, 01:28:51 am
  • avatar
    • Brazil
So, I could solve the problem with the jump light punch, however I wasn't able to solve the problem with the shoryuken...
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype != A <-- this solved my problem with the jump light punch;
trigger1 = statetype = S
trigger1 = ctrl

I tried this code  modification in state 0 that I've found in another forum, however it didn't work how I expected, because other than the character land in a unnatural way, now if I perform a strong shoryken, that state repeats if I push the light punch while in the air, so it becomes kind of a double strong shoryuken:

; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < Const(movement.stand.friction.threshold)
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050

[State 0, 5] ;Are you floating?
type = ChangeState
triggerall = pos y < 0
trigger1 = time > 1
value = 50