News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

[SOLVED]Custom state question

Started by momo!, December 31, 2010, 08:23:47 AM

Previous topic - Next topic

momo!

this might just be because i've missed it in the docs, but how do i force a custom state on an opponent?

I've created an animation for a sword move that would cut the opponent in half, but I'm not sure what state to use for the actual "being cut in half" sprites, how do I force that state to be used for that animation in another char, if I make sprites for it?

GT

Well....

For when the move connects you can do one of two things :

1. In the hitdef you can place p2stateno = (xxxx) (Usually creators put this line at the very bottom of the hitdef)
2. Use the targetstate state controller (This is preferred in most cases. As p2stateno is bugged at times).

But i dunno how you're going to implement p2 being cut in half. You'd probably have to use layer tricks or something.
Also, when adding the anim that you want p2 to use in their State use the changeanim2 state controller.

Cyanide

changeanim2 inside the custom state tells them to use a specific anim from YOUR files

using selfanimexist allows the character to check if it has a specific animation within it's own files. Say the "cut in half" is anim 384566


type = changeanim
trigger1 = selfanimexist(384566) = 1
value = 384566
persistent = 0

and then you do an alternate for when it doesn't exist to play something you've made uptrigger1 = selfanimexist(384566) = 0



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.