LoginLogin

Detecting more than one collition

Root / Programming Questions / [.]

raimondzCreated:
Hi, I'm having trouble by detecting multiple collisions on one sprite. Right now, I have a player that wield a sword and collide with an enemy. Because the sword overlap the player, the function SPHIT return the sword's Management number but not the enemy's number. What can I do to detect more than one collision?

Are you talking about SPHITSP? I didn't think SPCOL returns anything. With SPHITSP you should be able to set a range of sprites to check for collision. Maybe you could leave the sword out of that range? Otherwise, I'm not sure how you would check for multiple collisions.

When you set up a sprite's collision, you can put it into certain groups, and only sprite's in the same groups can collide. That's how it worked in PTC, anyways.