News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Can I change the turning anim? [SOLVED]

Started by Liquid Jake, March 01, 2011, 08:28:49 AM

Previous topic - Next topic

Liquid Jake

I have characters who are normally armed, but can be unarmed, and so that changes their sprites.  I need to have an unarmed turning animation, but I don't know how to do it.

I know that the standard turning anim is 5 for a standing character, and I can change that character's standing anim using variables, but where and/or how can I change the turning anim?  Can this even be done?


Cyanide

Turning is hardcoded. No matter what you do, you will have a short flicker of the character with/without the weapon.

Your best bet is actually do the turn without the weapon and use explod to display it in the correct spots while anim = 5


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.

Liquid Jake

Easy enough.  What else is coded this way?  I have every animation essentially twice; armed and unarmed.  Where else can I expect to fight with this?

Thanks.

rednavi -RETIRED

I remember several other hardcoded stuff inside most (If not all) of the common states but no one of them seems to be related to animation triggering besides the turning state (Which isnt even a state, it's something hardcoded inside most of the ground states like state 0 and 11). If I'm right you wont have other troubles regarding animation data.

Sam

#4
it's very easy.

yes, it is hardcoded and yes, you can change it

I did it like this in one of my character

;MECH TURN
[State -3, ChangeAnim]
type = ChangeAnim
trigger1 = Var(1)
trigger1 = Statetype = S
trigger1 = stateno = 0
trigger1 = !facing
value = 7

where var(1) is the var I'm using to know that the char has its mech mode on, and 7 is the new  turn anim

of course you'll have to make a similar piece of code to make your char turn when it's crouching, but it's the very same thing, just put a trigger like statetype = C  and stateno = 11

Liquid Jake


Riptide

Wait a sec. If your characters have to sets of sprites aren't you using a transformation. Or are you only dropping the weapon for an attack. Because I was thinking that you could just expand on a transformation code that lets you use two or more sets of sprites
for different modes.

Sam

strange enough, turn doesn't works that way. you can't change it using a normal changeanim or something like "anim+var()", so I think the only way to achieve what he wants is the way I told


but I can be wrong too xD if someone knows a better way, tell xD

Liquid Jake

Your way works great, that's how I'm doing it. 

The characters can be disarmed, and will remain that way until they get their wand back.  They're still in control while unarmed though, so the walking/jumping/crouching/etc anims are all determined by the armed/unarmed variable.  I didn't know how to change the turning anim, hence my question.

Thanks again.

Sam

I don't test i yet Liquid, but to avoid some potential bug in simul mode, you'll have to work a little more on that code and add I don't know, maybe a !(enemynear(0), facing). but test the way I show you first. if it works well don't change xD

rednavi -RETIRED

I think I know of a good way to fix this. What about just using a changeanim that kicks in when you are in the turning animation?

Like this:

[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = anim=5 && var(x)=value when unarmed
value = insert your alt turning animation here

I suggest using that on every state that supports turning, using it on the negative states will most likely create 1 frame bugs due to the 1 tick delay.

Sam

#11
it doesn't work
at least didn't worked when I tried


and using a -3  doesnt cause any frame delay

EDIT: just tested and yeah, doesn't work

Riptide

Quote from: Sam on March 02, 2011, 01:25:37 PM
strange enough, turn doesn't works that way. you can't change it using a normal changeanim or something like "anim+var()", so I think the only way to achieve what he wants is the way I told


but I can be wrong too xD if someone knows a better way, tell xD
hum....this doesn't seem like the only state that has this problem.

rednavi -RETIRED

I just tested the coding (You made me open mugen after so much time >:( ) and weird enough the turning animation doesnt even happen now, what a bitch! It should work, Elecbyyyyyyte!

Quote from: Riptide on March 02, 2011, 08:32:17 PM
hum....this doesn't seem like the only state that has this problem.
[/quote]

I'm sure the only anim with hardcoded changeanims are turning and crouch turning. The rest can be handled with ease. You may want to check the guarding states later just to be 100% sure Liquid Jake.

Whatever, I have CLTR=0 on all my states (Due to tag team system requirements) so I had to create my own turning states. That's not an option in this case (Outside of fullgame right?).

Liquid Jake

It's a full game, and I'm not using simul mode.  Maybe in a sequel, but I'll deal with that bridge when I get to it I guess.

rednavi -RETIRED

#15
well if you ever plan to use simul mode I suggest converting it into a tag team mode, that way you wont have any problems when coding your own custom turning state.

v EDIT: I tested mine.

Sam

Rednavi, you tested your code or mine? xD because I tested yours and you're right, the anim 5 doesn't appear too xD
EDIT: so far, the only hardcodeds anims I know are 5 and 11. guarding aren't (I know because my guarding anims change) and gethits are'nt too

Riptide

Maybe state 191. I'm assuming guard states don't have any problems.

Cyanide

No, 191 you can set the anim if you like. turning is the only hardcoded animation. More states are hardcoded than anims.

Walk or jump for example, you have to do a lot of fiddling to disable the up button from jumping.


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.

Ricepigeon

I'm surprised nobody has mentioned noautoturn yet.