Author Topic: sprite collision  (Read 4652 times)

tylercomp

  • Visitor
  • *
  • Posts: 2
    • View Profile
    • Email
sprite collision
« on: 2012-10-07, 11:01:39 PM »
Hello,

How do I set up rules around two sprite colliding?

For example when player1 sprite touches enemy1 sprite then I want to send player1 somewhere.

Thanks!

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: sprite collision
« Reply #1 on: 2012-10-08, 01:33:54 PM »
TestCollisionRect will output a numeric value indicating which sprite in a collection this sprite is touching, if any. If it returns -1 that means this sprite it not touching any sprite in the specified target category.