YesNoOk
avatar

Helper - 1 tick delay issue (Read 999 times)

Started by Violin Ken, March 31, 2019, 11:00:58 pm
Share this topic:
Helper - 1 tick delay issue
#1  March 31, 2019, 11:00:58 pm
  • ***
  • Support me @ ko-fi.com/violinken
    • youtube.com/c/ViolinKen
I have a state where a helper is called.  For each animelem of the helper, it creates a parent,varset.  In the parent state, there is an offset for pos y based on the parent, varset.   However, it seems that the offset is 1 tick off despite my best efforts in making the helper and parent position at the same time.  I'm not sure if hitpauses have any affect on this either.  Any ideas how to get around this?  I think I saw in another topic that you should just switch to an explod completely, but well, that defeats the purpose of using this offset.  Are there any other options?

[Parent Statedef]
[State 0, Offset]
type = Offset
trigger1 = time >=15
y = var(17)

;------------------------------------
[Helper Statedef]
[State 0, ParentVarSet]
type = changeanim
trigger1 = root, hitpausetime != 0
value = anim
elem = animelemno(0)

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = animelemtime(1) = 0
v = 17
value = 0

[State 0, ParentVarSet]
type = ParentVarSet
trigger1 = animelemtime(2) = 0
v = 17
value = -1
Support me @ ko-fi.com/violinken


Last Edit: April 03, 2019, 02:59:56 am by Violin Ken
Re: Helper - 1 tick delay issue
#2  April 01, 2019, 09:37:09 am
  • *****
  • Shame on you!
    • USA
See if something like this will work.

[Parent Statedef]
[State 0, Offset]
type = Offset
triggerall = numhelper(718) = 1
trigger1 = time >=15
y = 1-(helper(718), animelem)

obviously you want to change 718 to the helper you use.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Helper - 1 tick delay issue
#3  April 01, 2019, 10:11:20 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Nope. Cascading a var down is always 1 tick off. It does it on the helper tick after processing parent and you hve to wait till the next tick for it to register and take effect. Have to have the parent do it themselves or live with it.

Its what i had to deal with in omega red. There was no fix...


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: Helper - 1 tick delay issue
#4  April 02, 2019, 06:29:24 am
  • ***
  • Support me @ ko-fi.com/violinken
    • youtube.com/c/ViolinKen
That is a bummer.  Thank you guys for your input!
Support me @ ko-fi.com/violinken


Re: Helper - 1 tick delay issue
#5  April 02, 2019, 06:54:56 am
  • *****
  • Shame on you!
    • USA
Did you try the method I suggested?

There's always the ability to spoof things also. How you want to use a helper but an explod will work a tic faster. Use both. Have the explod and helper do their things. The explod has the look, the helper has the control(s).
vVv Ryuko718 Updated 10/31/22 vVv
Re: Helper - 1 tick delay issue
#6  April 02, 2019, 02:30:42 pm
  • ******
    • www.justnopoint.com/
Re: Helper - 1 tick delay issue
#7  April 03, 2019, 02:59:42 am
  • ***
  • Support me @ ko-fi.com/violinken
    • youtube.com/c/ViolinKen
Found a quick fix that makes it barely noticeable.  I think the issue was with the helper pause code I put in.  I just made it so the changeanim goes 1 frame back.  See below:

[Helper Statedef]
[State 0, ParentVarSet]
type = changeanim
trigger1 = root, hitpausetime != 0
value = anim
elem = animelemno(-1)
Support me @ ko-fi.com/violinken