YesNoOk
avatar

time doesn't increment properly in custom states (Read 1823 times)

Started by lipidking, December 01, 2021, 02:08:24 am
Share this topic:
time doesn't increment properly in custom states
#1  December 01, 2021, 02:08:24 am
  • **
  • Never enough cheese
    • USA
Coding a throw for my character, which is supposed to be a headbutt followed by the victim flying back from the impact. However, when the victim is released, he doesn't go into the gravity arc immediately but rises weirdly first. Why this happened was bugging me for the longest time.

I did some testing using ctrl+D to find the issue, and what I found out was that for when the thrown opponent "weirdly rises," time is stuck at 0 and doesn't properly go in the trajectory since the sctrl to apply gravity has a trigger of time > 0. So the question is, what is keeping the time at 0 in my custom states? Since the time is also locked at 0 for when the opponent is held in state 502, I speculate it might be an improper use of TargetBind. Do you guys have an answer?

Code for reference:
Spoiler, click to toggle visibilty
Last Edit: December 01, 2021, 03:11:18 am by lipidking
Re: time doesn't increment properly in custom states
#2  December 01, 2021, 02:39:09 am
  • ****
  • it's me
  • Bat's a Wrap.
    • Chile
    • koakoa@jabber.org
    • Skype - koakumadevil69
Those target states are being applied every frame, which make the target change state every frame, and therefore, reset their time back to 0 every frame. Make sure to apply the targetstate for only one frame.
Yeaaaah im shootign ducks wiht the paino
Re: time doesn't increment properly in custom states
#3  December 01, 2021, 03:08:35 am
  • **
  • Never enough cheese
    • USA
Ah, that makes a lot of sense. Thank you very much! I'll have to pay close attention to when triggers get activated.