YesNoOk
avatar

Animation resets during Hyper Armor! (Read 577 times)

Started by FobiaZz, October 14, 2019, 10:15:23 pm
Share this topic:
Animation resets during Hyper Armor!
#1  October 14, 2019, 10:15:23 pm
  • avatar
  • **
  • "Some People Are Born To Be Extraordinary"
    • Italy
    • fab.marchetti86@gmail.com
Hi there! I've got a problem with this special move, since when my character activates his hyper armor (condition: var(9) > 0, armor state 5310) and works corretly only when states are normal attacks, but not with special attacks. with all the special moves I've checked, except this one. When hit, the animation resets. Example:

Code:
[Statedef 1061]
type = S
movetype = I
physics = S
velset = 0,0
ctrl = 0
;anim = 1061
poweradd = ifelse (prevstateno = 5310,0,-1000)

[State 1061]
type = ChangeAnim
triggerall = prevstateno != 5310
trigger1 = time = 0
value = 1061

[State 1061]
type = PalFX
trigger1 = time = 0
time = 10
add = 32,16,0
mul = 256,256,256
sinadd = 64,32,0,10

[State 1061]
type = VarSet
triggerall = var(9) = 0
trigger1 = time = 0
var(9) = 1*tickspersecond

[State 1061]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1

Just can't figure out. Can you help me? Thanks.
Last Edit: October 15, 2019, 02:32:17 pm by FobiaZz
Re: Animation resets during Hyper Armor!
#2  October 14, 2019, 10:34:57 pm
  • ***
  • CPU Purple Heart
    • USA
    • www.dailymotion.com/2a8130871d2742d2f4da3b069
Add a "anim != 1061" trigger for the changeanim so that it will make sure it recognizes the animation already exists or not.
Re: Animation resets during Hyper Armor!
#3  October 14, 2019, 11:02:44 pm
  • avatar
  • **
  • "Some People Are Born To Be Extraordinary"
    • Italy
    • fab.marchetti86@gmail.com
Thanks Nep Heart...I've tried these ones:

Code:
[State 1061]
type = ChangeAnim
triggerall = anim != 1061
triggerall = prevstateno != 5310
trigger1 = time = 0
value = 1061

Code:
[State 1061]
type = ChangeAnim
triggerall = prevstateno != 5310 && anim != 1061
trigger1 = time = 0
value = 1061

But I obtain the same result. :(
Re: Animation resets during Hyper Armor!
#4  October 15, 2019, 11:02:41 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Can we see the armour state? And are you totally positive you haven't duplicated this state somewhere?

I am making the assumption your override is in -2.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Animation resets during Hyper Armor!
#5  October 15, 2019, 02:22:54 pm
  • avatar
  • **
  • "Some People Are Born To Be Extraordinary"
    • Italy
    • fab.marchetti86@gmail.com
Hi Cyanide! The armor state is an adaptation of Zvitor's Colossus:

Code:
; Armor
[Statedef 5310]
;type = U
movetype = H

[State 5310]
type = PalFX
trigger1 = time = 1
trigger2 = time = 5
time = 3
add = 32,16,0
sinadd = 64,32,0,3
ignorehitpause = 1

[State 5310]
type = PosFreeze
trigger1 = 1
value = 1

[State 5310]
type = ChangeState
trigger1 = life <= 0
value = ifelse (statetype = A, 5020, 5000)

[State 5310]
type = ChangeAnim
trigger1 = 1
value = anim
elem = var(5)

[State 5310]
type = ChangeState
triggerall = life > 0
trigger1 = time >= floor(gethitvar(hittime) * 0.8)
value = var(6)
ctrl = var(7)

[State 5310]
type = ChangeState
triggerall = life > 0
trigger1 = time > 15
value = 0
ctrl = 1

The automatic states are these below. If var(9) exists, the armor activates when the char goes on-hit states:

Code:
[State -3, Armor]
type = ChangeState
triggerall = stateno = 5000 || stateno = 5010
triggerall = life > 0
trigger1 = (time = 0) && (var(9))
value = 5310

[State -3, Armor]
type = VarSet
trigger1 = (movetype != H) && (stateno != 5310)
var(5) = animelemno(0)

[State -3, Armor]
type = VarSet
trigger1 = (movetype != H) && (stateno != 5310)
var(6) = stateno

[State -3, Armor]
type = VarSet
trigger1 = (movetype != H) && (stateno != 5310)
var(7) = ctrl

[State -3, Armor]
type = VarAdd
trigger1 = var(9) > 0
var(9) = -1

[State -3, Armor]
type = VarSet
triggerall = var(9) > 0
trigger1 = life <= 0
trigger2 = roundstate = 3
var(9) = 0
Last Edit: October 15, 2019, 02:40:29 pm by FobiaZz
Re: Animation resets during Hyper Armor!
#6  October 15, 2019, 02:36:38 pm
  • avatar
  • **
  • "Some People Are Born To Be Extraordinary"
    • Italy
    • fab.marchetti86@gmail.com
P.s. I modified the first post, I've found out that there's an animation reset for other special moves too (I figured out that animation wasn't resetting just 'cause enemy was hit from that move, interrupting the combo).

I've tried to set var(9) = 1 for everything, and in that case only normal attacks'animations (punches, kicks) don't reset. Why? T_T
Last Edit: October 15, 2019, 02:40:09 pm by FobiaZz
Re: Animation resets during Hyper Armor!
#7  October 16, 2019, 11:26:17 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Ugh. I forget what the thing was around time = 0 in the negative states. Like it works. But not for... something. Mighta just been common states it fails on.

Ctrl+d. See if your animation is ever incorrect.

I can't see anything wrong with what you have other than its not how I'd have done it. That should all work so we're missing something.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: Animation resets during Hyper Armor!
#8  October 20, 2019, 11:34:24 am
  • avatar
  • **
  • "Some People Are Born To Be Extraordinary"
    • Italy
    • fab.marchetti86@gmail.com
I tried the debug mode, there are not errors, but I've noticed the animation isn't resetted from the start, but resets from the first time of the current animelem. In fact:

Code:
[State -3, Armor]
type = VarSet
trigger1 = (movetype != H) && (stateno != 5310)
var(5) = animelemno(0)

I've tried to edit this way:

Code:
[State -3, Armor]
type = VarSet
trigger1 = (movetype != H) && (stateno != 5310)
var(5) = animelemno(var(8))

[State -3, Armor]
type = VarSet
trigger1 = (movetype != H) && (stateno != 5310)
var(8) = time

But there's no way to return the animation right to the current exact animation's time.

A this point, in order to have better results I should make animations' elements divided into more elements of just 1 tick each, or make the character unhittable during the animation's attack to avoid hits' repetitions.
Last Edit: October 20, 2019, 11:45:07 am by FobiaZz
Re: Animation resets during Hyper Armor!
#9  October 21, 2019, 06:05:34 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Ah. Yeah there is no good way round that as you can't set yourself to the frame you were on. Only the element. There are a few things you can do but they mostly suck.

One is as you have said which is 1 tick frames for the whole animation. The other would be a timer of sorts for each frame and you force the change each time (this would be so much worse to do) so nothing really works well.

It is mostly apparent when frames last a really long time. 2-5 ticks isn't very noticeable but long windups and cooldowns would get you stunlocked.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.