try something like this.. The way you had it set before, it wouldnt tell you when it's colliding or anything..
load image "ball1.bmp", 1
sprite 1,0,0,1
load image "ball2.bmp", 2
sprite 2,300,0,2
ballloop:
if inkey$()= "a" then sprite 2,sprite x(2) - 1,sprite y(2),2:WAIT 15
if inkey$()= "d" then sprite 2,sprite x(2) + 1,sprite y(2),2:WAIT 15
if sprite collision(1,2)
print "collision detected"
endif
if sprite hit (1,2)
print "collision detected"
endif
goto ballloop
SPRITE HIT
This command will return a one if the specified sprite has impacted against the target sprite specified. If a
target sprite has not been specified and a value of zero has been used, this command will return the sprite
number of any sprite impacting against it. The parameters should be specified using integer values.
SYNTAX
Return Integer=SPRITE HIT(Sprite Number, Target Sprite Number)
SPRITE COLLISION
This command will return a one if the specified sprite is overlapping the target sprite specified. If a target
sprite has not been specified and a value of zero has been used, this command will return the sprite
number of any sprite overlapping it. The parameters should be specified using integer values.
SYNTAX
Return Integer=SPRITE COLLISION(Sprite Number, Target Sprite Number)
sprite hit is impact.. collision is if it is overlapping the other sprite.
Also, you explained your problem extremely terribly..
Quote: "when the sprite you control hit the other sprite it wont work "
Next time specify what it is that isnt working. Ie.. it wont tell you when the sprites have collided, it wont do a specific action etc.
WindowsXP Home(Service pack 2), Athlon XP 2400+(2.1Ghz), 1GIG Ram, Ati Radeon 9800Pro 128MB.