• Edited

I was editing this player script that was working normally, but I've encountered a bug where after moving, state 2 plays, but velocity remains at 0 despite the code it should be running and seems to be able to read.
I'm having trouble spotting the issue going through my script and I was hoping somebody could spot something I didn't notice.
*removed

  • DaveTheCoder replied to this.
  • Sometimes I write code that's so complicated that it confuses me.

    One approach is to start over with simpler code, verify that it's working, and then gradually add in the details, testing it thoroughly after each change.

    DaveTheCoder Thank you so much for letting me know so that I could learn that.

    I changed my code to use that instead, but unfortunately it didn't have any affect on the bug.

    It seems to work like normal (i.e. how it's supposed to) if I comment out "facing = dir_input". I seem to be tangled up in my code and need to find out what's making that cause a problem, or make a difference.

    Sometimes I write code that's so complicated that it confuses me.

    One approach is to start over with simpler code, verify that it's working, and then gradually add in the details, testing it thoroughly after each change.