YesNoOk
avatar

help coding a character (Read 211 times)

Started by spaceman, February 16, 2019, 10:15:19 pm
Share this topic:
help coding a character
#1  February 16, 2019, 10:15:19 pm
  • avatar
  • *
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 .

ink

Re: help coding a character
#2  February 17, 2019, 03:27:22 am
  • ****
  • inktrebuchet
    • USA
    • s236.photobucket.com/albums/ff271/inktrebuchet/?
A second trigger on that explod would probably do it.

Code:
[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.
Last Edit: February 17, 2019, 03:31:13 am by ink
Re: help coding a character
#3  February 17, 2019, 11:30:50 am
  • avatar
  • *
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.

ink

Re: help coding a character
#4  February 17, 2019, 12:20:25 pm
  • ****
  • inktrebuchet
    • USA
    • s236.photobucket.com/albums/ff271/inktrebuchet/?
Re: help coding a character
#5  February 17, 2019, 12:43:00 pm
  • avatar
  • *
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.

ink

Re: help coding a character
#6  February 17, 2019, 06:57:30 pm
  • ****
  • inktrebuchet
    • USA
    • s236.photobucket.com/albums/ff271/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.