D
Dakota Benningfield
Guest
Hey everyone, this is my first post here so feel free to let me know if it isn't following the rules 100%, anyways I am trying to create a simple puzzle game for my first game, and am wondering if there is a good way to get the game to wait until there is a collision between the player object and a wall object before the movement can continue. I.E Player is an ice block and once moved left there can't be any further movement on the players part till the player hits the wall.
My proposed solution would be to have a variable that initializes as 0 then when the movement button is pressed it changes to 1 and on the collision it goes back to 0. My problem is that I don't know how to code in making the player wait until the variable hits 0.
Thanks so much for reading!
My proposed solution would be to have a variable that initializes as 0 then when the movement button is pressed it changes to 1 and on the collision it goes back to 0. My problem is that I don't know how to code in making the player wait until the variable hits 0.
Thanks so much for reading!