animtype = anim_type (string)

Started by Shamrock, August 31, 2008, 03:32:47 AM

Previous topic - Next topic

Shamrock

This being used in a hitdef If I wanted to add a new animtype example would be forward movements, how would I add that? Is this only in the source code or is it somewhere I can edit. I know the animation is in common but what about the this bit of code is there a way to add different label and moves to the animtype?

Byakko

None, it's hard-coded. But you can put the target in a custom state.
... what do you mean by forward movement exactly ?
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Shamrock

I'm trying to add more hit type moves for parameters such as animtype and fall. The idea being that I could have two falls set for the characters. The first being a fall backwards like mugen normally does and the second for falling fowards and a liedead that would be on the characters stomach instead of on his face.

It's not a big deal because a creator can get the same thing with  p2stateno = state_no (int) if it had required sprites for it but I was just trying to see if there would be a way to make it part of the system and a little easier.

Cyanide

No, animtype takes light med hard up back and diagup, that's it. Trip may be in there too, but i can't be bothered looking.


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.

Byakko

#4
Quotethe same thing with  p2stateno = state_no (int)
Just for the records, TargetState triggered on movehit && numtarget is usually preferred instead of p2stateno nowadays (mainly for attacks that hit each other at the same time and all)
Differenciating the "falling forward" and "backward" would be a problem, since not all games have both ; and if one character specifies fall fwd and fall back, his target may not have both. So there's only one kind of fall, and the target can have a "fall forward" animation for his regular fall depending on the game of origin. See Yamazaki Ryuuji, when falling down he ends up on his face, and gets up from his face : that's simply his animation, his regular get-up animation, only it's face down.
Anyway, if you really want to put both as long as you know what you're doing (for a full game for example) then targetstate is probably the best way to go.

In the common states, there indeed is a part that uses gethitvar(animtype), but it's given as
Quote from: data/common1.cnsvalue = 5005 + GetHitVar(animtype) + (GetHitVar(groundtype)=2)*10
so you could think you can put whatever value you want ; but it's actually calculated with
Quote from: http://mugenguild.com/docs/trigger.html#GetHitVar(*)  animtype: Returns the animation type of the hit. (0 for light, 1 for
            medium, 2 for hard, 3 for back, 4 for up, 5 for diag-up)
and this one is definitely hard-coded, so putting anything other than what already exists would return a failure. So in the end, you may as well stick with targetstate.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Shamrock

Yeah I see what you mean if the character already has the state in his def then it would be as simple as causing him to enter that state. This could be useful in a more compatible mugen but then it would have to be spelled out for anyone adding to that build.

I could even turn of the fall and hits and have people use the targetstate instead. Would also have to add change states for getting up.

Thanks B