YesNoOk
avatar

Helper timer resets when changing states (Read 856 times)

Started by JJkoolaid, May 31, 2021, 07:13:16 pm
Share this topic:
Helper timer resets when changing states
#1  May 31, 2021, 07:13:16 pm
  • **
  • Your Successor in Netherrealm Service!!!
    • USA
Need help on figuring this tough code. I made  a ice clone wall the takes hits 7 hits before its destroyed but
everytime it gets hit the timer resets when changing states. I want the timer to stay the same thru out states so ice barrier clone doesn't stay too long . I tried Explod code but didn't work and parent && root varset. Any suggestions will be helpful.Please check video shows timer resetting. Code is in the spoiler.

https://streamable.com/gr29k0


Spoiler, click to toggle visibilty
Your Successor in Netherrealm Service!!!
Last Edit: May 31, 2021, 07:20:18 pm by JJkoolaid

GT

Re: Helper timer resets when changing states
#2  May 31, 2021, 08:05:27 pm
  • *****
    • USA
    • Skype - gt_ruby
If I'm understanding correctly, you're using the helper animation as a timer correct?

If you remove the anim line from StateDef 1365 and StateDef 1367 and replace the ChangeAnim you have with this,

Code:
[State 1370, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 1370         
value = 1370   
   

the animation data (animno, elem, animelemtime(Possibly? lol)) will carry over when the helper cycles between the two states. Since the animation info is retained, the animtime will not go back to the beginning. The changestate you have in state 1367 would need to be adjusted since it calls for the animation to end before returning to state 1365. Is that why state 1367 has a different anim than 1365? Is it hitbox/changestate related?
Yeah Titiln, in fact, You Made Him
Re: Helper timer resets when changing states
#3  May 31, 2021, 10:18:44 pm
  • **
  • Your Successor in Netherrealm Service!!!
    • USA
If I'm understanding correctly, you're using the helper animation as a timer correct?

If you remove the anim line from StateDef 1365 and StateDef 1367 and replace the ChangeAnim you have with this,

Code:
[State 1370, ChangeAnim]
type = ChangeAnim
trigger1 = anim != 1370         
value = 1370   
   

the animation data (animno, elem, animelemtime(Possibly? lol)) will carry over when the helper cycles between the two states. Since the animation info is retained, the animtime will not go back to the beginning. The changestate you have in state 1367 would need to be adjusted since it calls for the animation to end before returning to state 1365. Is that why state 1367 has a different anim than 1365? Is it hitbox/changestate related?

the Change anim suppose to be the same as the anim as 1365 but except it is only 5 ticks.But I deleted and I tried your suggestion and I got it to work! Thanks for the big help!! But now the hit override works great with projectiles but hyper projectiles is another thing especially helper projectiles the clone stayed in one of Ryu's Shinkuu Hadoken and MVC2 Guild Sonic Hurricane Hyper. But the timer will do the rest to make sure it is not OP.

Spoiler, click to toggle visibilty


Your Successor in Netherrealm Service!!!