YesNoOk
avatar

Char doesn't get up after being knocked to the ground (Read 1456 times)

Started by mugenfan89, February 19, 2021, 05:12:24 am
Share this topic:
Char doesn't get up after being knocked to the ground
#1  February 19, 2021, 05:12:24 am
  • avatar
  • *
    • USA
Whenever I play a certain char in my mugen I always usually have to press a button so he can get up again I'm sure it must be some coding error but not quite exactly sure where the problem could lie. Please guys I appreciate any help
Last Edit: February 19, 2021, 04:33:54 pm by mugenfan89
Re: Char doesn't get up after being knocked to the ground
#2  February 19, 2021, 05:28:22 am
  • ***
    • Vietnam
    • sites.google.com/view/vinnie-mugen-projects/home
You can try to open his .cns file, check the "liedown.time" line and reduce the number to 60 or lower. This line determines how long the character lies until he gets up back.
Re: Char doesn't get up after being knocked to the ground
#3  February 19, 2021, 05:37:54 am
  • avatar
  • *
    • USA
You can try to open his .cns file, check the "liedown.time" line and reduce the number to 60 or lower. This line determines how long the character lies until he gets up back.

Thank you but I forgot to mention that I coded a special move before he started to get that error I believe it must have affected it somehow, however this is the code.

;---------------------

[Statedef 1900]     ;erdeschossen
type    = S
movetype= A
physics = S
juggle  = 2
velset = 0,0
anim = 1010
ctrl = 0

[State 10000, open]
type = PlaySnd
trigger1 = AnimElem = 7
value = 4, 21

[State 1000, 0.1]
type = Posset
trigger1 = Pos Y != 0
trigger1 = time = 0
Y = var(57)

[State 1601, explosion]
type = Envshake
trigger1 = animelem = 6
time = 12
freq = 70
ampl = 7

[State 9251,misil]
type = Helper
trigger1 = animelem = 7
ID = 815
postype = p1
pos = 0,0
stateno = 1510
ownpal = 1
size.xscale = 0.6
size.yscale = 0.6

[State 1000, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
;---------------------------
[Statedef 1510]     ;un misil
type    = S
movetype= A
physics = S
juggle  = 2
velset = 6,0
anim = 1011

[State 0, AngleDraw]
type = Assertspecial
trigger1 = 1
flag = noshadow
time = 9999
ignorehitpause = 1

[State 10000, rakieta]
type = PlaySnd
trigger1 = time%12 = 4
value = 0, 6
volume = 30

[State 10000, rakieta]
type = envshake
trigger1 = time%12 = 4
time = 6
freq = 70
ampl = 5

[State 10000, rakieta]
type = veladd
trigger1 = 1
X = 6

[State 1601, explosion]
type = Explod
trigger1 = time%12 = 4
anim = 498
pos = 0,0
postype = p1
sprpriority = -1 + 2*(random%2)
vel = 0,-1
random = 40,40
ownpal = 1

[State 1601, explosion]
type = Explod
trigger1 = time%12 = 4
anim = f34
pos = 0,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-3
random = 60,50
ownpal = 1

[State 1601, explosion]
type = Explod
trigger1 = time%12 = 4
anim = 1005 + random%3
pos = 0,5
postype = p1
sprpriority = -2
facing = -1 + 2*(random%2)
vfacing = -1 + 2*(random%2)
scale = 0.8,0.4
vel = 0,0
ownpal = 1
ignorehitpause = 1


[State 1601, Hit]
type = HitDef
trigger1 = !movecontact
attr = S, HP
pausetime = 0,2
damage    = 199, 98
animtype = back
air.animtype = Back
guardflag = L
sparkno = -1
guard.sparkno = -1
hitsound   = 5,0
guardsound = 5,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-12
air.velocity = 0,-8
air.fall = 1
fall.recover = 0
air.juggle = 3
yaccel = .45
kill       = root, Var(9) = 0
fall.kill  = root, Var(9) = 0
guard.kill = root, Var(9) = 0

[State 1601, explosion]
type = Explod
trigger1 = movehit = 1
anim = f30 + random%2
pos = 0,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-6
random = 60,50
ownpal = 1
persistent = 0
removetime = 44

[State 1601, explosion]
type = Explod
trigger1 = movehit = 1
anim = f30 + random%2
pos = 0,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-6
random = 60,50
ownpal = 1
persistent = 0
removetime = 44

[State 1601, explosion]
type = Explod
trigger1 = movehit = 1
anim = f30 + random%2
pos = 0,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-6
random = 60,50
ownpal = 1
persistent = 0
removetime = 44

[State 1601, explosion]
type = Explod
trigger1 = movehit = 1
anim = f30 + random%2
pos = 0,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-6
random = 60,50
ownpal = 1
persistent = 0
removetime = 44

[State 10000, rakieta]
type = destroyself
trigger1 = time = 72

[Statedef 5120]
type    = L
movetype= I
physics = N
ctrl = 0

[State 810, reset]
type = nothitby
trigger1 = time = 0
value = SCA,NA,SA
time = 1

[State 1001, combo receive]
type = selfstate
triggerall = abs(p2dist x) < 60 || abs(p2bodydist x) < 12
trigger1 = p2stateno = 24 && numexplod(24) = 0; not sure
value = 0
ctrl = 1

[State 810, Grab Sound]
type = Statetypeset
trigger1 = time = 12
value = C

[State 810, Grab Sound]
type = Statetypeset
trigger1 = time = 20
trigger2 = AnimTime = 0 && p2dist x < -20
value = S


[State 810, Grab Sound]
type = ctrlset
trigger1 = time = 20 && life > 1
trigger1 = p2dist x > 0
value = 1

[State 810, Grab Sound]
type = assertspecial
trigger1 = time >= 12
flag = nowalk

[State 5110, 11] ;If just died
type = ChangeState
trigger1 = var(50) = 0 && command = "holddown"
triggerall = time > 12
triggerall = life > 1
triggerall = fvar(5) != 116
trigger2 = var(50) = 1 && random%12 < AILevel && p2bodydist x < 30
trigger2 = p2stateno = 200||p2stateno = 210||p2stateno = 240||p2stateno = 430
value = 11

[State 5110, 11] ;If just died
type = ChangeState
trigger1 = var(50) = 0 && command = "holdup"
triggerall = time > 6
triggerall = life > 1
trigger2 = var(50) = 1 && random%12 < AILevel && abs(p2bodydist x) < 100
trigger2 = p2stateno = 245
value = 40

[State 5110, 11] ;If just died
type = selfState
trigger1 = var(50) = 0 && command = "blok"
triggerall = time > 0
triggerall = life > 1
trigger2 = var(50) = 1 && random%12 < AILevel
trigger2 = inguarddist||(p2movetype = A&&enemy,movecontact = 0&&abs(p2dist x) < ifelse(p2stateno = 245, 120, 80))
triggerall = fvar(5) != 103
value = 120

Re: Char doesn't get up after being knocked to the ground
#4  February 19, 2021, 04:25:20 pm
  • ***
    • Vietnam
    • sites.google.com/view/vinnie-mugen-projects/home
Hmm. No P2stateno detected in  HitDef, nor TargetState. Which means the opponent didn't get put into a custom state. Instead, lots of complicated ChangeState(s) and SelfState(s) detected in 5120 - a non-custom StateDef.

I just gave your code a run on my character. Here's a quick fix that I used on the code.

;-
[Statedef 5120]
type    = L
movetype= I
physics = N
anim = 5120
ctrl = 0

[State 810, reset]
type = nothitby
trigger1 = time = 0
value = SCA,NA,SA
time = 1

[State 1001, combo receive]
type = selfstate
triggerall = abs(p2dist x) < 60 || abs(p2bodydist x) < 12
trigger1 = p2stateno = 24 && numexplod(24) = 0; not sure
value = 0
ctrl = 1

[State 810, Grab Sound]
type = Statetypeset
trigger1 = time = 12
value = C

[State 810, Grab Sound]
type = Statetypeset
trigger1 = time = 20
trigger2 = AnimTime = 0 && p2dist x < -20
value = S


[State 810, Grab Sound]
type = ctrlset
trigger1 = time = 20 && life > 1
trigger1 = p2dist x > 0
value = 1

[State 810, Grab Sound]
type = assertspecial
trigger1 = time >= 12
flag = nowalk

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-

Remove the current [StateDef 5120] and paste this instead. Your problem should be fixed by indicating the "stand-up" animation and remove a couple of redundant ChangeState(s) and SelfState(s).
Re: Char doesn't get up after being knocked to the ground
#5  February 19, 2021, 04:33:44 pm
  • avatar
  • *
    • USA
Hmm. No P2stateno detected in  HitDef, nor TargetState. Which means the opponent didn't get put into a custom state. Instead, lots of complicated ChangeState(s) and SelfState(s) detected in 5120 - a non-custom StateDef.

I just gave your code a run on my character. Here's a quick fix that I used on the code.

;-
[Statedef 5120]
type    = L
movetype= I
physics = N
anim = 5120
ctrl = 0

[State 810, reset]
type = nothitby
trigger1 = time = 0
value = SCA,NA,SA
time = 1

[State 1001, combo receive]
type = selfstate
triggerall = abs(p2dist x) < 60 || abs(p2bodydist x) < 12
trigger1 = p2stateno = 24 && numexplod(24) = 0; not sure
value = 0
ctrl = 1

[State 810, Grab Sound]
type = Statetypeset
trigger1 = time = 12
value = C

[State 810, Grab Sound]
type = Statetypeset
trigger1 = time = 20
trigger2 = AnimTime = 0 && p2dist x < -20
value = S


[State 810, Grab Sound]
type = ctrlset
trigger1 = time = 20 && life > 1
trigger1 = p2dist x > 0
value = 1

[State 810, Grab Sound]
type = assertspecial
trigger1 = time >= 12
flag = nowalk

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-

Remove the current [StateDef 5120] and paste this instead. Your problem should be fixed by indicating the "stand-up" animation and remove a couple of redundant ChangeState(s) and SelfState(s).

Thank you friend it seems to work now properly