YesNoOk
avatar

Custom Death Animation (Read 6496 times)

Started by mfgfgm, December 25, 2017, 08:13:15 am
Share this topic:
Custom Death Animation
#1  December 25, 2017, 08:13:15 am
  • avatar
  • *
Hello, I'm trying to make a character that plays a certain animation when he dies rather than just fly back and fall. I already made the animation but I don't know how to implement it into the character. If you happen to know how to code it, could you please help me?
Re: Custom Death Animation
#2  January 06, 2018, 08:35:52 pm
  • ****
  • Hey, I'm Grump!
    • USA
    • soldier.ucoz.net/
use a changestate in -2 to a custom state for only when hes on the ground and he dies.

[statedef -2]
[state -2, changestate]
type=changestate
trigger1=life<=0
trigger1=statetype!=A
value=90812
ctrl=0

and....

;custom death animation
[statedef 90812]
type=S
movetype=I
physics=S
anim=90812
ctrl=0
velset=0,0

[state 90812, changestate]
type=changestate
trigger1=animtime=0
value=5150
ctrl=0

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."
Re: Custom Death Animation
#3  January 09, 2018, 11:39:01 pm
  • **
    • Italy
I don't have time to try it myself, but shouldn't the trigger 1 of state -2 contain

trigger1 = stateno !=90812

To prevent state 90812 from looping into itself ?

With only

trigger1=life<=0
trigger1=statetype!=A

As far as i know, with this trigger1, during the execution of state 90812 the computer will check if there are the conditions to change into it and will restart it
Re: Custom Death Animation
#4  January 13, 2018, 01:53:10 am
  • ****
  • Hey, I'm Grump!
    • USA
    • soldier.ucoz.net/
sure. i wrote it up on the spot. i wasnt bothered with the small details. it was just an idea for him to work with.

(Youtube) (WIP) (Mediafire) (New Anime Shop) My Manga Reviews! Personal favorite Patreon! Check her out!

"There is nothing either good or bad, but thinking makes it so."