Detecting Collision between 2 object in 1 type

BlitzPlus Forums/BlitzPlus Programming/Detecting Collision between 2 object in 1 type

Is it possible (and if so, please post some example code) to create 1 type of say, 20 objects and detect collisions between these 20 objects. I know I can detect collisions between two seperate types, but how about objects in just 1 type.

Thank you for any help.....Duff

http://www.blitzbasic.com/Community/posts.php?topic=73849

Okay,
SO I looked at the link provided above, but it compares objects of two different types. What I want to do is create a type of, say, 10 objects. I want them to float around the screen randomly and when they collide with each other, bounce off. Of course I need collision detection, but I want to use only 1 type. Anybody have any idea if this is even possible? If so, some exampe code would helpful......
Duff

The link posted does check between objects of the same 'type'.

type user
field x,y
field image
end type
global player.user = new user
player\x = 0
player\y = 480
player\image = loadimage("?.bmp/png/jpeg");the name of the image in the folder + whatever ext. your img has
global enemy.user = new user
enemy\x = 640
enemy\y = 0
enemy\image = loadimage("?.bmp/png/jpeg")

while not keydown(1)
drawimage(player\image,player\x,player\y)
drawimage(enemy\image,enemy\x,enemy\y)
UpdateEnemyAI();Do some sort of ai fuction
If ImagesOverlap(player\image,player\x,player\y,enemy\image,enemy\x,enemy\y)
GameOver() ;some sort of function to end the game
endif
wend

function UpdateEnemyAI()
;put ai code here
end function

function GameOver()
print "game over!"
delay 3000
end
end function