Scrolling Game Development Kit Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Scrolling Game Development Kit Forum
»
SGDK Version 2
»
Help, Errors, FAQ
»
sprite collision
« previous
next »
Print
Pages: [
1
]
Author
Topic: sprite collision (Read 8435 times)
tylercomp
Visitor
Posts: 2
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!
Logged
bluemonkmn
SGDK Author
Administrator
Fanatic
Posts: 2761
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.
Logged
Ben Marty
Scrolling Game Development Kit 2
Print
Pages: [
1
]
« previous
next »
Scrolling Game Development Kit Forum
»
SGDK Version 2
»
Help, Errors, FAQ
»
sprite collision