The Mugen Fighters Guild

Help => M.U.G.E.N Development Help => Topic started by: tizerist on May 27, 2019, 09:49:23 pm

Title: Character not landing....
Post by: tizerist on May 27, 2019, 09:49:23 pm
It seems my posts about this have (rather suspiciously) gone missing in here:
http://mugenguild.com/forum/topics/character-not-landing-148255.0.html

I have a scenario where character A fights character B, and when character B gets hit upwards, she won't land. State 822 is what comes up when it happens.
https://imgur.com/nHQGAUt
State 822 is to do with character A. B does not have it in any of her files.
How can I stop this happening? Any help appreciated.
Title: Re: Character not landing....
Post by: DeathScythe on May 28, 2019, 12:25:09 am
You're puting character B in a custom state coded in character A files. You can tell it is a custom state because is in yellow.
Is the move a throw or something? Because states 800~899 are usually throws, and throws always use custom state.
Title: Re: Character not landing....
Post by: altoiddealer on May 28, 2019, 06:22:18 pm
Go into character A .CNS files and find State 822.  There is probably faulty coding there.

Copy/paste that code here if you can't determine the issue (wrap it in Spoiler tags)
Title: Re: Character not landing....
Post by: tizerist on May 29, 2019, 12:04:19 am
Ok, cheers, I only really use watch mode, I don't think it's a throw.
Spoiler, click to toggle visibilty
Title: Re: Character not landing....
Post by: altoiddealer on May 29, 2019, 05:14:41 pm
What I am seeing is a custom state that the character being hit goes into.

The character is given Air physics, given a Velocity (launched upwards), then that's it.


I'm just going to copy/paste what Kung Fu Man uses to end his "being thrown" custom state.
Just copy/paste this into the end of Statedef 822 and you should be good to go.

[State 821, 2] ; Recover near ground (use ChangeState)
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200 ;HITFALL_RECOVER

[State 821, 3] ; Recover in mid air (use SelfState)
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210 ;HITFALL_AIRRECOVER

[State 821, 4] ;Hit ground
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100 ;Hit ground
Title: Re: Character not landing....
Post by: tizerist on June 07, 2019, 10:14:00 pm
^ ^ All of that text was already there
Title: Re: Character not landing....
Post by: altoiddealer on June 08, 2019, 05:40:39 am
...in State 822?

Well you didn’t copy/paste that part!  Please share the code for the entire State 822
Title: Re: Character not landing....
Post by: tizerist on June 08, 2019, 01:35:53 pm
Ah ok.
Spoiler, click to toggle visibilty
Title: Re: Character not landing....
Post by: Cyanide on June 10, 2019, 04:56:11 am
Physics is A so the character should be dropping down. But you say they aren't. Given that the time in state appears to be over 9000 they also aren't being put into it over and over again.

Is that the only statedef 822 the character has? Sometimes people double up.

Also can we have a full screen shot of the issue rather than just debug?
Title: Re: Character not landing....
Post by: tizerist on June 15, 2019, 05:27:50 pm
The only other bit of text that contains 822 is this section of the .cns:
Spoiler, click to toggle visibilty
and in the .air file:
Spoiler, click to toggle visibilty

PICTURE (tenma has floated up off screen after the glitch)
https://imgur.com/ZLZayUW
Title: Re: Character not landing....
Post by: DeathScythe on June 15, 2019, 05:50:34 pm
Weird cause nothing seems to be wrong here. Let's try something else. Change physics to N and add a veladd code to emulate gravity. Your code should look like this:

Spoiler, click to toggle visibilty

Test and see what is happening.
Title: Re: Character not landing....
Post by: tizerist on June 15, 2019, 10:51:45 pm
Wow, that worked! Thank you! What the hell did I just change?
Title: Re: Character not landing....
Post by: Cyanide on June 16, 2019, 12:00:27 am
You told mugen to simulate gravity. Can also be done with the gravity sctrl rather than velset. Basically you told it to do what physics A should have been doing. Ummm you have set a y accel value in the constants right?
Title: Re: Character not landing....
Post by: tizerist on June 30, 2019, 06:49:30 pm
yaccel for tenma (the floater) is .33
Title: Re: Character not landing....
Post by: tizerist on February 05, 2020, 08:00:44 pm
Hello. Its happened again. This time when Dudley hits Wesker.
https://imgur.com/JPjmhjB
https://imgur.com/OTkN9dM
Only Dudley has a state 442. The first chunk of his text pertaining to 442 looks like this:

;Jump Light Punch
; CNS difficulty: easy
[Statedef 442]
type    = A
movetype= H
physics = N
juggle  =0; 2
poweradd= 5
ctrl = 0
sprpriority = 2
velset=-1,ifelse(enemy,var(59)=5,4,-4)
poweradd= 59
ctrl = 0
sprpriority = -2
[State 0, VelAdd]
type = VelAdd
trigger1 =1
y = ifelse(enemy,var(59)=5,.67,.54)
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 =anim!=5070 && time=0
value = 5070
;elem = 1
;ignorehitpause =
;persistent =

As you can see, his physics is already set to N. What else can I change to stop this happening?
Title: Re: Character not landing....
Post by: DeathScythe on February 05, 2020, 08:17:54 pm
First, just showing your debug like this is not much of a help, it would be better if you show a screenshot of what is happening with the char.
I'm assuming the char is going underground, right? Like falling forever. If so, is because there is no changestate/selfstate at the end, so you need to add one.

Try adding this to the end of state 442:

[State 0, 0]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100
Title: Re: Character not landing....
Post by: tizerist on February 09, 2020, 04:09:39 pm
That worked! Thank you ever so much :)