News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

help coding a character

Started by spaceman, February 16, 2019, 10:15:19 PM

Previous topic - Next topic

spaceman

I need help coding some type of animation.

I would like to insert an animation such as the following: first we have the stance
                                                                                            second we have the fire ignition


this one works well

[State 0, fire ignition 1]
type = Explod
trigger1 = anim = 0 && Time = 0
anim = 1
sprpriority = 1

besides I get this



I need "the fire ignition" to work after the turn anim over. ( anim = 1 ; fire ignition )

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

Thanks to help .

inktrebuchet

#1
A second trigger on that explod would probably do it.


[State 0, fire ignition 1]
type = Explod
trigger1 = anim = 0 && Time = 0
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
anim = 1
sprpriority = 1


I just grabbed that trigger from the ChangeAnim you posted. It say that anim = 5(turn) is over (AnimTime = 0).

*It would probably be easier to test by having the enemy jump over your player.

spaceman

I entered the code. The fire ignition doesn't work.

However

Code :

[State 0 , fire ignition 2]
type = Explod
trigger1 = anim = 5
anim = 1
sprpriority = 1

works but the animation fires several times as long as the animation turn works.

I need him to do it once.

inktrebuchet

I'm guessing the one I posted isn't working because of the order the code is in. The explod would need to be before(above) the [state0,1] changeanim for it to work.

For your explod to not fire more than once you could try adding an ID to the explod and use numexplod = 0 as part of the trigger. Or you could add a animelem trigger. http://mugenguild.com/forum/topics/anim-vs-animelem-vs-animelemno-vs-animelemtime-vs-animtime-169010.0.html

spaceman

I solved the problem.

I created new sprite by superimposing the image of the character with the flames to have an image. and playing with the anim.air (stance). the illusion is almost perfect. thanks for the help. I will rest if I have a problem again.

now I can do the same for the crouch anim.

thanks.

inktrebuchet

That sounds like it would show the ignition animation everyone the animation looped too, but that works.

Don't forget to switch the topics icon to solved if you're happy with everything.