Today I learned how to fixed a bug on my game , in previous post I found a problem that whenever my character ran into a wall , it will get stuck . and also I learned a few function in GML. what i did : I use "place_meeting()" function to check the the wall is in front of the player, then I use the "while" function , which it mean carry on the coding. I also use "sign" function to limit the number of hspeed and vspeed. in "sign" if the speed is over 1 or -1 , it will return to 1 or -1 . so I use these function to fix my problem of the game .
The next day I'm going to next tutorial of platform "
power up" , and then add more function in there.
No comments:
Post a Comment