YesNoOk
avatar

how to make 2 difference death anim by 2 condition? (Read 11365 times)

Started by alongcaca, 2 months ago
Share this topic:
how to make 2 difference death anim by 2 condition?
#1  2 months ago
  • **
    • Vietnam
Hi everyone
i want make 2 difference death animation by 2 conditions
1/ Condition 1: if get hit by normal attack use death animation 1
2/ Condition 2: if get hit by hyper or super attack use death animation 2
how to code it.
i see the code below for hit life down, but I don't know where to change the condition in the code below to match the above condition.
Thanks for reading
Code:
  1. ; HIT_LIEDOWN
  2. [Statedef 5110]
  3. type    = L
  4. movetype= H
  5. physics = N
  6.  
  7. [State 5110, EnvShake]
  8. type = FallEnvShake
  9. trigger1 = Time = 0
  10.  
  11. [State 5110, 1] ;For hit up/up-diag type (from state 5081)
  12. type = ChangeAnim
  13. persistent = 0
  14. trigger1 = SelfAnimExist(5110 + (anim % 10))
  15. trigger1 = anim = [5081,5089]
  16. value = 5110 + (anim % 10)
  17.  
  18. [State 5110, 2] ;Hit ground anim (normal)
  19. type = ChangeAnim
  20. triggerall = time = 0
  21. triggerall = anim != [5110,5119] ;Not already changed anim
  22. trigger1 = anim != [5161,5169]
  23. trigger2 = !SelfAnimExist(5170 + (anim % 10))
  24. value = 5170
  25.  
  26. [State 5110, 3] ;Hit ground anim (for hit up)
  27. type = ChangeAnim
  28. triggerall = time = 0
  29. triggerall = anim != [5110,5119] ;Not already changed anim
  30. trigger1 = anim = [5161,5169]
  31. trigger1 = SelfAnimExist(5170 + (anim % 10))
  32. value = 5170 + (anim % 10)
  33.  
  34. [State 5110, 4]
  35. type = HitFallDamage
  36. trigger1 = Time = 0
  37.  
  38. [State 5110, 5]
  39. type = PosSet
  40. trigger1 = Time = 0
  41. y = 0
  42.  
  43. [State 5110, Var] ;Get fall velocity
  44. type = VarSet
  45. trigger1 = Time = 0
  46. trigger1 = GetHitVar(fall.yvel) != 0
  47. sysvar(1) = floor(vel y)
  48.  
  49. [State 5110, 6]
  50. type = PlaySnd
  51. trigger1 = Time = 1
  52. value = S0,6
  53.  
  54. [State 5110, 7]
  55. type = GameMakeAnim
  56. trigger1 = Time = 0
  57. trigger1 = !SysVar(0)
  58. value = 60 + (sysvar(1) > 5) + (sysvar(1) > 14)
  59. pos = 0, 0
  60. under = sysvar(1) <= 14
  61.  
  62. [State 5110, 8]
  63. type = VelSet
  64. trigger1 = Time = 0
  65. y = 0
  66.  
  67. [State 5110, 9] ;For hit up type
  68. type = ChangeAnim
  69. persistent = 0
  70. triggerall = anim = [5171,5179]
  71. triggerall = SelfAnimExist(5110 + (anim % 10))
  72. trigger1 = AnimTime = 0
  73. trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground anim
  74. value = 5110 + (anim % 10)
  75.  
  76. [State 5110, 10] ;For normal
  77. type = ChangeAnim
  78. persistent = 0
  79. triggerall = Anim != [5111,5119]
  80. trigger1 = AnimTime = 0
  81. trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
  82. value = 5110
  83.  
  84. [State 5110, 11] ;If just died
  85. type = ChangeState
  86. triggerall = !alive
  87. trigger1 = AnimTime = 0
  88. trigger2 = SysVar(0) ;SysVar(0) = 1 avoids hit ground frame
  89. trigger3 = Anim = [5110,5119]
  90. value = 5150
  91.  
  92. [State 5110, 12]
  93. type = VarSet
  94. trigger1 = SysVar(0)
  95. trigger1 = Time = 0
  96. sysvar(0) = 0
  97.  
  98. [State 5110, 13] ;Friction
  99. type = VelMul
  100. trigger1 = 1
  101. x = 0.85
  102.  
  103. [State 5110, 14]
  104. type = ForceFeedback
  105. trigger1 = alive
  106. trigger1 = Time = 0
  107. time = 8
  108. ampl = 240
  109. waveform = sine
  110.  
  111. [State 5110, 15]
  112. type = ForceFeedback
  113. trigger1 = !alive
  114. trigger1 = Time = 0
  115. ampl = 200, 7, -.467
  116. time = 30
  117. waveform = sine
Re: how to make 2 difference death anim by 2 condition?
#2  2 months ago
  • *****
  • Shame on you!
    • USA
You might need to make a variable or a hitspark/helper that spawns when the last hit happens. I don't think I've done something like this, so I don't know an exact method.
But you'd use the helper/var/explod to be "1" or "2" so when the round state changes values aren't lost.

I think most chars are set up so that ultras are higher than Statedef 3000. So you could use a check to see what state P2 is in when life = 0 in statedef -2. Whatever you spawn, just set it up so that ifelse( Enemy, StateNo >= 3000, , ) <<< spawns the two values you want.

I could be totally off though.
vVv N00bSaibot & Muramasa RoofTop vVv
Re: how to make 2 difference death anim by 2 condition?
#3  2 months ago
  • **
    • Vietnam
You might need to make a variable or a hitspark/helper that spawns when the last hit happens. I don't think I've done something like this, so I don't know an exact method.
But you'd use the helper/var/explod to be "1" or "2" so when the round state changes values aren't lost.

I think most chars are set up so that ultras are higher than Statedef 3000. So you could use a check to see what state P2 is in when life = 0 in statedef -2. Whatever you spawn, just set it up so that ifelse( Enemy, StateNo >= 3000, , ) <<< spawns the two values you want.

I could be totally off though.

 Thanks for reply, i will try your idea