YesNoOk
avatar

Issues with my jump land animation. (Read 6939 times)

Started by baymanpjl, September 21, 2017, 12:02:09 pm
Share this topic:
Issues with my jump land animation.
#1  September 21, 2017, 12:02:09 pm
  • avatar
  • *
Hello everyone I have a big problem with an MK game I been trying to work on.  And its my landing state 52.   My character is landing in the wrong frame when I hit my opponent with an Air Forward attack.  But when I don't hit my opponent I land in the correct frame, as shown in image.  I'm suppose to have 2 landing animations like the original MK games.

I tried to mess with state 52 and my character ended up going through the floor.  Is there any way I can have 2 landing state animations without breaking the game?  Cause there is a lot of work put on it.


Re: Issues with my jump land animation.
#2  September 21, 2017, 07:13:49 pm
  • avatar
  • ***
    • https://sites.google.com/site/mgmurrow/
in the jump landing state put this controller at the top of the state

[State 52, End]
type=changeanim
trigger1= (Prevstateno=620) && !time;<------whatever state your air forward attack number is
value=0;<------------whatever your new landing animation is
elem=3;<------------whatever animelem you want the new landing to start on (just put it on 0) for the first anim in the landing state
persistent=0

hope this helps

MGMURROW
Re: Issues with my jump land animation.
#3  September 23, 2017, 07:55:11 am
  • avatar
  • *
I think I might have not given a better explanation on my troubles.


The way I have it set up in Fighter Factory for my Neutral jump animation is 40.  It starts off with just a single jump sprite  jUp1. 

Then 41 is a single jump sprite (jUp2.) 

Then 42 has jUp1 to jUp3(land sprite 1) in an animation. 

Now for my Forward Jump animation which is 43 it's a single sprite J0F1. 

Then animation 44 has the Forward jump ball jump animation.  45 is the same as 44 but reversed for jumping backwards. 

This is code from the Common1.

; Jump Start
[Statedef 40]
type = A
velset = const(velocity.jump.neu.x)*(command = "holdfwd" - command = "holdback"), const(velocity.jump.y)
anim = 40 + 3*(command = "holdfwd" | command = "holdback") + var(59)
ctrl = 0

[State facing fix]
type = turn
trigger1 = !time & p2dist x < 0

[State 40, 0]
type = Gravity
trigger1 = time > 0

[State 40, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 50

;---------------------------------------------------------
[Statedef 50]
type = A
anim = 44 + (vel X < 0) - 3*(vel X = 0) + var(59)
ctrl = 1

[State 50, 0]
type = Gravity
trigger1 = 1

[State 50, 1]
type = ChangeState
trigger1 = (pos y - fvar(25)) >= 0
value = 52

;---------------------------------------------------------
[Statedef 52]
type = S
anim = 43 - (vel X = 0) + var(59)
ctrl = 0
facep2 = vel X != 0

[State 52, 0]
type = VelSet
trigger1 = time = 0
X = 0
Y = 0

[State 52, 1]
type = PosSet
trigger1 = time = 0
Y = fvar(25)

[State 52, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0

Here is the Air kick code

[Statedef 620]
type = A
movetype = A
anim = 620 + var(59)
ctrl = 0
facep2 = 1

[State 620, 0]
type = Gravity
trigger1 = 1

[State 620, 1]
type = HitDef
trigger1 = !movecontact & p2statetype != A
attr = S, NA
damage = 26, 7
animtype = up
guardflag = M
p2facing = 1
ground.velocity = -3, 8
guard.hittime = 11
guard.velocity = -2
air.velocity = -3, 8
yaccel = 0.5
priority = 1 + numexplod(298)*(random/50) , miss
ground.cornerpush.veloff = 0

[State 620, 1a]
type = HitDef
trigger1 = !movecontact & p2statetype = A
attr = S, NA
damage = 26
p2facing = 1
air.velocity = -3.5, 6
yaccel = 0.5
priority = 1 + numexplod(298)*(random/50) , miss
ground.cornerpush.veloff = 0

[State 620, 2]
type = ChangeState
trigger1 = movecontact
value = 621

[State 620, 3]
type = ChangeState
trigger1 = (pos y - fvar(25)) >= 0
value = 52

;---------------------------------------------------------
[Statedef 621]
type = A
movetype = A
velset = 0, 0
anim = 621 + var(59)
ctrl = 0

[State 621, 0]
type = AttackMulSet
trigger1 = time = 0
value = 0.5

[State 621, 1]
type = VarSet
trigger1 = time = 0
V = 0
value = var(0) | 1

[State 621, 2]
type = VelAdd
trigger1 = time > 9
Y = 0.75

[State 621, 3]
type = ChangeState
trigger1 = time > 9
trigger1 = (pos y - fvar(25)) >= 0
value = 52


So right now mugen is making my character land in his Neutral jump anim



This is what I need mugen to do.

Last Edit: September 23, 2017, 08:06:31 am by baymanpjl
Re: Issues with my jump land animation.
#4  September 23, 2017, 10:50:21 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
It's still pretty much what has been said

Add in to state 52 as the first sctrl

[State 52]
type = changeanim
trigger1 = prevstateno = [620,621]
value = 43
persistent = 0

You're basically done. If that does not work, it means that your character is re-entering state 50 after making contact with the opponent.


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.
Re: Issues with my jump land animation.
#5  September 26, 2017, 05:27:27 am
  • avatar
  • *
Well I finally had time to test it, and It looks like it didn't work.  I guess I'm going to have a look at state 50.  Thank you for the help.