Yeah, your code in that was not that great either. Really, everything doesn't have to be in the step event. The "direct" variable you were using was not really used, but I renamed it to the standard "direction" as that was the same thing - you also had a flaw in your code where "direct" for a right condition was checked at 90 which is up. There were some places in your code that were redundant, your spacing and bracket use was terrible, etc.
I am not saying that mine is perfect because I did not feel like going back into it again and checking every little thing, but I made some improvements for the hell of it.
In mine, you can:
- Go left or right at by increments of 4 if you are on the ground or in the beginning of a jump.
- Only go left or right by increments of 3 when "landing".
- Jump only if you are on the ground.
- If you jump and there is a block above you that you would otherwise jump over in terms of height, you "stick" to it until the jump is over rather than fall instantly (to change this, you just have to change a few variables)
- I also changed the origin of the sprites, but changing that shouldn't do anything bad, I was just seeing if that was causing anything.
Anyway, the attachment is in a GMK file since I am on a computer that runs Vista as its operating system. I could have made it a GM6, but that would have involved copying the download to a USB flashdrive, editing it on an old computer, etc.