Jump to content
  • 0

Arch like attack Help


dragonrod

Question

Hello Guys!

 

I was working on something when an doubt just popped into my mind:

 

How do I do an attack like an arch?

I mean, the user is on the ground, jumps up into the air, makes the "arch", then falls, recognizes the floor and finally changes his animation in contact with it.

 

I tried to explain the best way I can...

Please, help me! :D

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Give him a negative y velocity, an x velocity, and set gravity (or an appropriate y accel).

 

From Andore that I made

[State 300, 1]

type = VelSet

trigger1 = Time = 0

y = -9



[State 300, 1]

type = VelSet

trigger1 = 1

x = (p2dist x) / 25



[State 300, gravity]

type = gravity

trigger1 = 1
Link to comment
Share on other sites

  • 0

I recommend having two states - your attack state and a seperate state for landing instead of using the default 'jump land' state. Set your first state's physics to 'N' - this means that Mugen's default jumping physics - gravity and automatically changing to State 52 when the character is touching the floor - don't apply and give us much more control over how the move should behave, especially in terms of the recovery state when they hit the ground.

 

In your first state, have a VelSet trigger at the point where you character leaps or jumps up with a negative Y and a positive X value (if it's moving forwards while jumping). After the jump occurs, use a VelAdd controller which only triggers after the initial VelSet, and make it add a small amount to the Y velocity on each frame - this slows down their rate of ascent and eventually cases them to begin falling, like gravity. Depending on how the attack should look you may want to also decrease the X velocity or reset it to 0 at a certain point, like how a shoryuken stops travelling forward once the character begins to turn around.

Also remember to use a StateTypeSet controller to turn StateType = A (for air) once your character leaves the ground.

 

To make a falling character go into a landing state, use a ChangeState controller with the trigger

"trigger1 = Pos Y + Vel Y >= 0"

and also the same trigger you used to check if the character has left the ground so that they don't immediately try to 'land' before jumping

 

In your second state, the landing, add a VelSet trigger at time = 0 to set their Y velocity to 0 so they don't continue to fall through the floor. You may also want to set the X velocity to 0 or let the standard physics have the character slide forward a bit then slow down with friction. Also use a PosSet controller to trigger at time = 0 that sets y = 0, just to make sure the character hasn't fallen slightly too far and ends up 'underground'.

 

Afterwards, do the ususal thing to go back to state 0 at the end of their landing animation or whatever.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...