You have two options to achieve that:
- Use SPCOL on each sprite and check their position with SPHITRC. This function let you check if there is any sprite colliding with the rectangle defined with SPHITRC...or
- Get each sprite position with SPOFS and check if the coordinate is inside a rectangle.