News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Transformations & State Changing

Started by Noctis, March 26, 2009, 05:01:28 AM

Previous topic - Next topic

Noctis

I've been annoyed by this for a while now. I made a transformation v = 100 and value = 10000. So when I turn I should be in the animation 10005 instead of 5. Same for the crouch turn. I should be in 10006 instead of 6. Well, when I jump over the opponent, land, and turn around I don't go into 10005, I stay in 5. When he jumps over me and I turn I stay in state 0 or 10000 and just turn around. For my crouch turn I have the opponent jump over me and I repeat state 6 nonstop until I stop holding down and it's in state 6 instead of 10006. Look at the codings below. I don't see what's wrong with them.

; Stand
[Statedef 0]
type = S
physics = S
sprpriority = 0

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0+var(100) && Anim != 5+var(100)
trigger2 = Anim = 5+var(100) && AnimTime = 0 ;Turn anim over
value = 0+var(100)

[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0

[State 0, 3] ;Stop moving if low velocity or 4 ticks pass
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0

[State 0, 4] ;Are you dead?
type = ChangeState
trigger1 = !alive
value = 5050


; Crouching
[Statedef 11]
type    = C
physics = C
anim = 11+var(100)
sprpriority = 0

[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = Anim = 6+var(100) && AnimTime = 0
value = 11+var(100)

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."

Cyanide

Turning is not happy with transformations. Even if you detect anim 5, and change to anim 50000, you tend to get normal flickers. I've messed with it before, turning turn's sprites off is far simpler.

As for why things are breaking for you. Variables are 0-59, var 100 won't work.


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.

Noctis

#2
How would you turn it off? I've only gotten rid of a jump before and I only did that by changing its command.

I changed the vars to 50 and it still does the same thing I explained.

Edit:
Yeah well I tried making it so that it plays the transformed animation instead of the original and nothing happens. It's like the state doesn't even exist even though it IS there.

Edit:
......I turned them off by accident. (I don't know what I did but no errors) Anyways, until I get some help or figure this out they're staying where they're at. Turned off.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."