collision help

kipdevkipdev Member Posts: 275

Hey guys. I made a game imported my art and everything but didnt realize that game salad does collisions by squares not pixels. I followed the youtube video.. but i am still having problems reversing this formula . All i want is if the front of the player hits the left side of the enemy that the player dies, if its the top or right side then nothing happen. Way to think about what i am needing help with is if a right side of the player box hits the left side of the enemy box then the player dies otherwise nothing. I tried to set up attributes enemyleft (enemybox) and attribute enemy right (playerbox) constrained attribute (enemy) game.enemy box to self.position x -(self width)-50 and did for the player )selfpostion x x+(self.width)+50 if those two are equal upon collison kill the player, but its not working, thanks for any help

Comments

  • kipdevkipdev Member Posts: 275

    Nevermind, after 2 hours problem solved. Geez I cant wait til im a pro at this lol. 1 little miss calculation can throw off the whole game. Thanks anyway guys.

Sign In or Register to comment.