HelloFangaming / HelloMarioEngine

A feature packed and fully commented Super Mario engine for GameMaker: Studio 1.4.

Home Page:http://hellofangaming.github.io/HelloMarioEngine/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[SOLUTION] Walk sprite bug

Dynamotivation opened this issue · comments

If you tap the right arrow key just for a short time Mario will just slide over the ground for a few pixels without changing his sprite to the walking animation. If you press left very shortly this does not happen and he instantly changes his sprite. Can you post a small fix for this issue, because im not able to identify what causes the issue.

I just fixed it:

Im obj_mario End Step event:

96 image_speed = (abs(hspeed)*-1)/10

Replace your line 96 with this one and everything should work

This is just a workaround and there is probably a more elegant way to do this, so I reopened the issue. NO INTENDED SPAM

I added your fix, with some changes: ec8b1dd

I don't know if you will read this, but in the level manager object where you are drawing the HUD you made a small mistake, I think so at least, because you are drawing the text for the amount of lives remaining with string_format, but I think you meant to use string_fill_zeros(lives, 2). It just stood out to me, because it was the only string on the HUD which wasn't filled with zeros.