YesNoOk
avatar

Stuck in turning loop if trying to turn (Flying) (Read 1057 times)

Started by airforce111, July 11, 2020, 05:56:36 pm
Share this topic:
Stuck in turning loop if trying to turn (Flying)
#1  July 11, 2020, 05:56:36 pm
  • avatar
  • **
    • USA
Heres a video of my problem



Specifics: This only happens on my flying characters, both using 2 different types of fly code, so it must be specifically something wrong with my turn parameters for it to be doing this. When trying to pass a character they get stuck in this loop as long as you hold forward. If you tap forward slightly and slowly try to cross the enemy, then it will succesfully turn, but its still glitchy:



Thoughts?
Last Edit: July 15, 2020, 08:59:41 pm by airforce111
Re: Stuck in turning loop if trying to turn (Flying)
#2  July 15, 2020, 08:58:52 pm
  • avatar
  • **
    • USA
Fixed the issue. I put the flying code in -2 state again (I was trying to workaround add004 with it) I was able to add a !ctrl flag in add004 for these specific characters to tag out. As far as turning issue goes, I added this:

Code:
[state 0]
type = Velset
trigger1 = p2dist x < 0
x = (1 and 2 work fine, for some reason added velocity allows the turn to complete instead of being stuck in 1 position)

[state 0]
type = ChangeAnim
trigger1 = p2dist x < 5 ( turning early with added velocity somehow smoothed it out)
value = 5

[State 0]
type = Turn
trigger1 = p2dist x < 0 (<---argueable trigger, I also see some others who put the trigger on turn as 'if anim = 5" which works too, maybe better. but you have to add some exceptions then and changeanim triggers to know when you're done turning and done with turning animation)