I don’t know what your skidding issue is, and I don’t recall seeing it happen when I tested the demo…
That problem can be replicated by doing this:
First, move and then jump, and while still holding the left or right button, wait for the character to land and keep holding the button, you will see that the character is stuck at the end of the jump sequence rather than moving to the walk sequence.
I don’t know your game logic at this point, so there are any number of possibilities. It seems, however, that you have isolated when the issue occurs, and very specifically so… now you need to carefully follow your logic flow and figure out why. Apparently something is not being set/reset properly when the character lands after a jump (foot sensor collision).
I thought you had solved this long ago, with the sprite sequences and foot sensor. Not sure why it’s coming back now, after implementing the new controller system. The controller system by itself doesn’t have anything to do with sprites, it simply tells you which button is being pressed or not.
Brent
The were two problems sliding and skidding.
The sliding was solved (character keeps moving after letting go of left or right key), the skidding was not (character stays on the end of jump animation if you land while holding the left of right key)
I can’t determine anything without code. I guess you need to change the animation sequence back to walking when the player lands… and make sure it stays that way until he jumps.
I’m not sure what your personal work flow is, but in my own development, the very traditional and old-school method of simply drawing out things on paper serves me better than anything else. If I sit down and draw a logic flow chart, and think in my head what needs to happen at each step along the way, it makes my coding 1000x easier and cleaner… and I don’t forget things that I might have forgotten by just hashing out code on-the-fly.
Brent
I understand that you need the code, but I don’t want to paste a large block of code and just say “Here you go!”, right now I think the solution would go in the jump function or the collision function. But I am not sure how to implement it.
Logically it would be setting the sequence to “walk” in the collision function, when the foot sensor enters (“began” phase) of a solid surface. But at that point you wouldn’t want to start playing the walk, just set it to the first frame (unless you have some type of “idle” sequence, in which case you might want to set it to that and start playing that sequence). Only when the player starts walking again, by press of a directional button, would you want to start playing the walk sequence.
Brent
Ok, I will try this out!
Huge thanks to you, Brent! Works fine now, I set the sequence to walk and it works perfectly! Setting it to idle, caused him to look like the character was sliding on a very slippery surface.