Shaun Spaulding top down tile collision system help

I've been following Shaun Spaulding's Action RPG GameMaker tutorial on youtube. In his third episode in the tutorial, he focuses on making a tile collision system. I've run into an issue where when my player object collides with something going to the right, the players position is reset to the left most side of the tile. This does not happen when the player collides with a wall to the top
, bottom, or left. My only programming experience is with a few high school classes several years ago, and I'm not able to understand the code enough to figure out where the issue lies, despite my best efforts.
I've attached screenshots of all the code that I believe to be relevant, but if there's anything else you think you need, let me know and I'm of course happy to provide additional information. At the bottom is a gif of the problem occurring, if my description wasn't good enough.
PlayerCollision.PNGplayerCreate.PNGPlayerStateFree.PNGplayerStep.PNGgif.gif
 

TheouAegis

Member
I've been following Shaun Spaulding's Action RPG GameMaker tutorial on youtube. In his third episode in the tutorial, he focuses on making a tile collision system. I've run into an issue where when my player object collides with something going to the right, the players position is reset to the left most side of the tile. This does not happen when the player collides with a wall to the top
, bottom, or left. My only programming experience is with a few high school classes several years ago, and I'm not able to understand the code enough to figure out where the issue lies, despite my best efforts.
I've attached screenshots of all the code that I believe to be relevant, but if there's anything else you think you need, let me know and I'm of course happy to provide additional information. At the bottom is a gif of the problem occurring, if my description wasn't good enough.
View attachment 43025View attachment 43026View attachment 43027View attachment 43028View attachment 43029
You checked if sign(hspeed) == 1. You aren't using hspeed to move, you're using hSpeed.
 
Top