Today in Gamemaker I fixed my glitch. The glitch was when the player would jump on an enemy they would die. I fixed it by changing the collision code between the player and enemy. The old code "if(y+(sprite_height/2) < other.y-(other.sprite_height/2)+vspd)" used the players and enemies height to figure out when the enemy would be destroyed. The new one "(y < other.y-vspd)" is much less complicated and doesn't use it which makes the hit box between the player and enemy more accurate.
No comments:
Post a Comment