I just replaced the old GetPixels with your updated one and it still says the two sprites have collided even though the player is floating in the air.
This is the code thus far:
REM Project: DELETE
REM Created: 8/26/2010 11:55:46 AM
REM
REM ***** Main Source File *****
REM
SET DISPLAY MODE 1024, 768, 32
SYNC ON
SYNC RATE 60
HIDE MOUSE
LOAD IMAGE "player.png", 1
SPRITE 1, 300, 300, 1
LOAD IMAGE "ground.png", 10
SPRITE 10, 0, 0, 10
DO
IF Find Sub String$(PixelCollision(1,10),"BotL")
TEXT 100, 100, "IT WORKS!"
ENDIF
SYNC
LOOP
Function PixelCollision(spr1,spr2)
col$=""
mem=1
while memblock exist(mem)
inc mem
endwhile
spr2Img=Sprite Image(spr2)
Make memblock from image mem,spr2Img
memWidth=Image Width(spr2Img)
memHeight=Image Height(spr2Img)
memSize=Get memblock size(mem)
Col$=GetPixels(spr1,spr2,mem,memSize,MemWidth)
`if spacekey()=1
`delete image spr2Img
`make image from memblock spr2Img,mem
`save image "TEST1.jpg",spr2Img
`delete memblock mem
`end
`endif
delete memblock mem
Endfunction Col$
Function GetPixels(spr1,spr2,mem,memSize,MemWidth)
col$=""
Xpos=sprite x(spr1)
Ypos=sprite y(spr1)
Width=Sprite width(spr1)
Height=Sprite height(spr1)
dim PointLoc(8)
if Xpos>=Sprite X(spr2) and Xpos<=Sprite X(spr2)+Sprite Width(spr2) and Ypos>=Sprite Y(spr2) and Ypos<=Sprite Y(spr2)+Sprite Height(spr2)
Pos=(3+Xpos+1+(Ypos-1)*MemWidth)*4
if Pos<MemSize and Pos>11
PointLoc(1)=memblock byte(mem,Pos+3)
endif
Pos=((3+Xpos+Width-1)+(Ypos-1)*memWidth)*4
if Pos<MemSize and Pos>11
PointLoc(2)=memblock byte(mem,Pos+3)
endif
Pos=(3+Xpos+1+(Ypos+Height+1)*memWidth)*4
if Pos<MemSize and Pos>11
PointLoc(3)=memblock byte(mem,Pos+3)
endif
Pos=(3+Xpos+Width-1+(Ypos+Height+1)*memWidth)*4
if Pos<MemSize and Pos>11
PointLoc(4)=memblock byte(mem,Pos+3)
endif
Pos=(3+Xpos-2+(Ypos+1)*memWidth)*4
if Pos<MemSize and Pos>11
PointLoc(5)=memblock byte(mem,Pos+3)
endif
Pos=(3+Xpos-2+(Ypos+Height-1)*memWidth)*4
if Pos<MemSize and Pos>11
PointLoc(6)=memblock byte(mem,Pos+3)
endif
Pos=(3+Xpos+Width+2+(Ypos+1)*memWidth)*4
if Pos<MemSize and Pos>11
PointLoc(7)=memblock byte(mem,Pos+3)
endif
Pos=(3+Xpos+Width+2+(Ypos+Height-1)*memWidth)*4
if Pos<MemSize and Pos>11
PointLoc(8)=memblock byte(mem,Pos+3)
endif
endif
if PointLoc(1)<>0 then Col$=Col$+"TopL"
if PointLoc(2)<>0 then Col$=Col$+"TopR"
if PointLoc(3)<>0 then Col$=Col$+"BotL"
if PointLoc(4)<>0 then Col$=Col$+"BotR"
if PointLoc(5)<>0 then Col$=Col$+"LefT"
if PointLoc(6)<>0 then Col$=Col$+"LefB"
if PointLoc(7)<>0 then Col$=Col$+"RigT"
if PointLoc(8)<>0 then Col$=Col$+"RigB"
Endfunction col$