Walk/Crawl while Crouching Problem

Started by Cenobite 53, October 17, 2012, 01:39:18 AM

Previous topic - Next topic

Cenobite 53

I wanted to give a Char the possibility to Walk/Crawl while Crouching.
It kinda worked like I tryed it, but then a problem occured:
When I press DF he walks foward with his correct Crawl animation, but if I move my finger away from F and only on D, he still keeps looping his crawling Animation but sits there like normal Crouching (so the normal crouching anim doesn't show up)

Pretty bad explained by me :P

BTW from the code:

cmd

[Command]
name = "holddownfwd"
command = /$DF
time = 1

[State -1, crwlfoward]
type = ChangeState
value = 22
triggerall = command = "holddownfwd" 
trigger1 = statetype = C
trigger1 = ctrl



cns

; Crawl
[Statedef 22]
type    = C
physics = C
sprpriority = 0

[State 22, 1]
type = VelSet
trigger1 = command = "holddownfwd"
x = const(velocity.walk.fwd.x)-2

[State 22, 2]
type = ChangeAnim
triggerall = vel x > 0
trigger1 = Anim != 22 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 22
look at my sprite rips  HERE
look at my TMNT Project HERE
My Contribution to mugen: Stages: 897 | Chars: 8 | Fullgames: 1 | Spritesheets: 85

Cyanide

You don't have control. Why should he go back to crouching? As far as the game is concerned it's done it's bit.

You have pressed down+forward so enter state 22. There is nothing to make him LEAVE state 22. So when you release forward all he will do is stop.


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.

Cenobite 53

Quote from: Cyanide on October 17, 2012, 02:33:43 AM
You have pressed down+forward so enter state 22. There is nothing to make him LEAVE state 22. So when you release forward all he will do is stop.
Yeah thats the problem. Why doesn't he leave the State?
Should I add a ChangeAnim State with a trigger1 = command =! "holddownfwd" to change to the Crouch anim or what?

look at my sprite rips  HERE
look at my TMNT Project HERE
My Contribution to mugen: Stages: 897 | Chars: 8 | Fullgames: 1 | Spritesheets: 85

Cyanide

He doesn't leave the state because there is nothing to tell him to do so. ctrl = 0, so you can't do anything in it. You haven't provided any out whatsoever.

Enter state 22, that's it.

Sorry, i know you've been coding for a while, this is more of a "this is what's wrong" i'm not actually providing you with an answer because i have a pretty fair idea that you'll be able to sort something out with your prior knowledge.


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.

Cenobite 53

Quote from: Cyanide on October 17, 2012, 07:58:44 AM
Sorry, i know you've been coding for a while, this is more of a "this is what's wrong" i'm not actually providing you with an answer because i have a pretty fair idea that you'll be able to sort something out with your prior knowledge.
lol, I've released my last char 6 years ago and all my old chars are bullcrap cause I had no idea how to make a char properly. I've nearly only worked on stages after that and got back to char creation only a few month ago and I'am still learning.

     Posted: October 17, 2012, 04:45:44 PM
OK got it. solved
look at my sprite rips  HERE
look at my TMNT Project HERE
My Contribution to mugen: Stages: 897 | Chars: 8 | Fullgames: 1 | Spritesheets: 85