SPCOL <sprite num>
make sure you do this for all the sprites that you want to detect are touching each other.
SPHITSP(<sprite num>,<sprite num>[,<to sprite num>])
this will return a boolean, so use it in an IF statement.
the optional third parameter makes it return true if the first sprite is hitting any of the sprites between the second param and the third param.
Because you're not giving another sprite ID to the SPHITSP function. Right now, you're asking if sprite id 2 is being hit, and SPHITSP is asking frantically for a specific sprite or sprite range to check collision with sprite 2 for.
Yes, and I also found a problem with your code, if this is your final game structure.
The SPHITSP needs to be called inside of the same loop that moves the sprites about, otherwise it will just check once and be done.
Try a simple program, like this:
SPCOL(MG1)
SPCOL(MG2)
HIT=SPHITSP(MG1,MG2)
IF HIT THEN IF BUTTON(2) AND-
16 THEN BEEP 7
MG1 and MG2 are Management Numbers, which is the 1st number you put in SPSET (In SPSET 3,4 , 3 is the management number) This all means is if MG1 touches MG2 then allow IF BUTTON(2) AND 16 THEN BEEP 7. If you have any questions, i dont mind answering!