sprite hit dind'nt work.
well here is the whole code.
rem ==================================
rem =============Rune Pong============
rem ==================================
`++++++++++++++++++++++++++++++++++++++++++++++++++++++******************************
` ========= media ========= *****************************
`++++++++++++++++++++++++++++++++++++++++++++++++++++++******************************
`++++++++++++++++++++++++++++++++++++++++++++++++++
` ========= images =========
`++++++++++++++++++++++++++++++++++++++++++++++++++
load image "imagesball.jpg",1
load image "imagesbat.jpg",2
load image "imagesbackground.bmp",100
load image "imagespuContshif.jpg",3
load image "imagespuEarthquake.jpg",4
load image "imagespuElectromag.jpg",5
load image "imagespuEnlarge.jpg",6
load image "imagespuFlash.jpg",7
load image "imagespuLuckypot.jpg",8
load image "imagespuMeteor.jpg",9
load image "imagespuPointboost.jpg",10
load image "imagespuScrambler.jpg",11
load image "imagespuShadowclone.jpg",12
load image "imagespuShield.jpg",13
load image "imagespuSpeedInc.jpg",14
load image "imagespuWhirlpool.jpg",15
load image "rune itemelectromag1.jpg",16
load image "rune itemelectromag2.jpg",17
load image "rune itemelectromag3.jpg",18
load image "rune itemelectromag4.jpg",19
load image "rune itemwhirlpool1.jpg",20
load image "rune itemwhirlpool2.jpg",21
load image "rune itemflash1.jpg",22
load image "rune itemflash2.jpg",23
load image "rune itemflash3.jpg",24
load image "rune itemflash4.jpg",25
load image "rune itemflash5.jpg",26
load image "rune itemflash6.jpg",27
load image "rune itemflash7.jpg",28
load image "rune itemflash8.jpg",29
load image "rune itemflash9.jpg",30
load image "rune itemflash10.jpg",31
load image "rune itemflash11.jpg",32
load image "rune itemflash12.jpg",33
load image "rune itemflash13.jpg",34
load image "rune itemflash14.jpg",35
load image "rune itemflash15.jpg",36
load image "rune itemflash16.jpg",37
load image "rune itemflash17.jpg",38
load image "rune itemflash18.jpg",39
load image "rune itemenlarge.jpg",40
load image "rune itemmeteor.jpg",41
load image "rune itemscrambler1.jpg",42
load image "rune itemscrambler2.jpg",43
load image "rune itemshadowclone.jpg",44
load image "imagesPowerUpTemplate.jpg",45
`++++++++++++++++++++++++++++++++++++++++++++++++++
` ========= music =========
`++++++++++++++++++++++++++++++++++++++++++++++++++
load music "musicbattle.mid",1
`#####################################################################
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++========
` ========== The Game ===============
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++========
`#####################################################################
`++++++++++++++++++++++++++++++++++++++++++++++++++
` ========= title screen =========
`++++++++++++++++++++++++++++++++++++++++++++++++++
print "========= rune pong ==========="
print " ============================="
print " ==========================="
print " ========================="
print " ======================="
print " ==================="
print " ============="
print " ======="
print " ==="
print " ="
print " press any key to continue"
suspend for key
cls
`++++++++++++++++++++++++++++++++++++++++++++++++++
` ========= menu =========
`++++++++++++++++++++++++++++++++++++++++++++++++++
dim playerpu(2,13)
textone$="start game"
texttwo$="about the game"
textthree$="items"
text 50,50,textone$
text 50,100,texttwo$
text 50,150,textthree$
do
if mousex()>50 and mousex()<50+text width(textone$)
if mousey()>50 and mousey()<50+text height(textone$)
if mouseclick()=1
goto begingame
endif
endif
endif
loop
`-------------------------------------------------------
`++++++++++++++++++++++++++++++++++++++++++++++++++
` ========= begining of game | player selection =========
`++++++++++++++++++++++++++++++++++++++++++++++++++
`--------------------------------------------------------
begingame:
cls
print "are you playing single player or playing with a friend"
selection=1
`===
do
cls
if selection=1
print ">multiplayer"
print "singleplayer"
endif
if selection=-1
print "multiplayer"
print ">singleplayer"
endif
`controls up down
if upkey()>0 and goon=0
selection=selection*-1
goon=100
endif
if downkey()>0 and goon=0
selection=selection*-1
goon=100
endif
`check so it does not go so fast
if goon>0 then goon=goon-1
`===
`check selection
`multiplayer
if spacekey()=1 and selection=1
ai=1
goto gamestart
endif
`singleplayer
if spacekey()=1 and selection=-1
ai=2
goto gamestart
endif
loop
`++++++++++++++++++++++
` choose charicter variable help\ playerpu({what char},1)={the player sklill slot}
`++++++++++++++++++++++
gamestart:
dim playerchar(2)
cls
print "classes:"
print "1=bishop"
print "2=warlock"
print "3=wich"
print "4=druid"
print "5=sage"
print "player 1 choose your charicter"
input playerchar(1)
cls
print "classes:"
print "1=bishop"
print "2=warlock"
print "3=wich"
print "4=druid"
print "5=sage"
print "player 2 choose your charicter"
input playerchar(2)
`bishop
for player=1 to 2
if playerchar(player)=1
playerpu(player,1)=10
playerpu(player,2)=13
playerpu(player,3)=4
playerpu(player,4)=12
playerpu(player,5)=3
endif
`warlock
if playerchar(player)=2
playerpu(player,1)=8
playerpu(player,2)=3
playerpu(player,3)=1
playerpu(player,4)=9
playerpu(player,5)=2
endif
`witch
if playerchar(player)=3
playerpu(player,1)=7
playerpu(player,2)=5
playerpu(player,3)=1
playerpu(player,4)=13
playerpu(player,5)=3
endif
`durid
if playerchar(player)=4
playerpu(player,1)=11
playerpu(player,2)=12
playerpu(player,3)=5
playerpu(player,4)=1
playerpu(player,5)=2
endif
`sage
if playerchar(player)=5
playerpu(player,1)=6
playerpu(player,2)=2
playerpu(player,3)=9
playerpu(player,4)=12
playerpu(player,5)=4
endif
next player
`++++++++++++++++++++++++++++++++++++++++++++++++++
` ========= game!!!!! =========
`++++++++++++++++++++++++++++++++++++++++++++++++++
`gamestart:
print "press any key when you are ready"
suspend for key
cls
`sync stuff
sync on
sync rate 150
`define variables
bat1y=100
bat2y=100
ballx=320
bally=240
balldirx=1
balldiry=1
phase=1 ` phase1|--> phase-1|<--
Ballspeed#=1
p1Score=0
p2Score=0
pot=0
p1pp=43
p2pp=43
`======main loop========================================================
singleplayer:
loop music 1
sleep 2000
do
sprite 1,0,70,100
cls
gosub p1controls
gosub p2controls
gosub wallballcollision
gosub batcollision
gosub ballmove
gosub displayscore
gosub showpowerup
gosub powerupcollision
if ballx=-20
scoreto=2
gosub scoring
endif
if ballx=640
scoreto=1
gosub scoring
endif
gosub updatescreen
loop
p1controls:
if upkey()=1 and bat2y>70 then bat2y=bat2y-2
if downkey()=1 and bat2y<330 then bat2y=bat2y+2
sprite 101,625,bat2y,2
return
p2controls:
if keystate(17)=1 and bat1y>70 then bat1y=bat1y-2
if keystate(31)=1 and bat1y<330 then bat1y=bat1y+2
sprite 100,0,bat1y,2
return
wallballcollision:
if bally=70 or bally=460 then balldiry=balldiry*-1
return
batcollision:
ballmid=bally+10
if ballx=15
if ballmid>bat1y-10
if ballmid<bat1y+160
balldirx=balldirx*-1
phase=phase*-1
if ballmid>bat1y and ballmid<bat1y+50
pot=pot+10
endif
if ballmid>bat1y+50 and ballmid<bat1y+100
pot=pot+25
endif
if ballmid>bat1y+100 and ballmid<bat1y+150
pot=pot+10
endif
endif
endif
endif
if ballx=610
if ballmid>bat2y-10
if ballmid<bat2y+160
balldirx=balldirx*-1
phase=phase*-1
if ballmid>bat2y and ballmid<bat2y+50
pot=pot+10
endif
if ballmid>bat2y+50 and ballmid<bat2y+100
pot=pot+25
endif
if ballmid>bat2y+100 and ballmid<bat2y+150
pot=pot+10
endif
endif
endif
endif
return
ballmove:
if balldirx=1 then ballx=ballx+Ballspeed#
if balldirx=-1 then ballx=ballx-Ballspeed#
if balldiry=1 then bally=bally+Ballspeed#
if balldiry=-1 then bally=bally-Ballspeed#
sprite 2,ballx,bally,1
return
displayscore:
text 5,5,str$(p1Score)
text 600,5,str$(p2Score)
text 300,5,str$(pot)
return
` sprite# 500
`
`
` sprite# 501
`
`
` sprite# 502
showpowerup:
if ballx=15
`define the values for the power ups and their positions
powerupTOP=playerpu(1,(rnd(4)+1))
powerupMID=playerpu(1,(rnd(4)+1))
powerupLOW=playerpu(1,(rnd(4)+1))
`sprite
sprite 500,300,110,powerupTOP+2
sprite 501,300,230,powerupMID+2
sprite 502,300,350,powerupLOW+2
endif
if ballx=610
`define the values for the power ups and their positions
powerupTOP=playerpu(2,(rnd(4)+1))
powerupMID=playerpu(2,(rnd(4)+1))
powerupLOW=playerpu(2,(rnd(4)+1))
`sprite
sprite 500,300,110,powerupTOP+2
sprite 501,300,230,powerupMID+2
sprite 502,300,350,powerupLOW+2
endif
`scale sprite
if sprite exist(500)=1
for q=500 to 502
scale sprite q,50
next q
endif
return
powerupcollision:
if sprite hit (1,500)=1 and phase=1 then p1pp=powerupTOP
if sprite hit (1,501)=1 and phase=1 then p1pp=powerupMID
if sprite hit (1,502)=1 and phase=1 then p1pp=powerupLOW
if sprite hit (1,500)=1 and phase=-1 then p2pp=powerupTOP
if sprite hit (1,501)=1 and phase=-1 then p2pp=powerupMID
if sprite hit (1,502)=1 and phase=-1 then p2pp=powerupLOW
sprite 200,100,2,p1pp+2
sprite 201,450,2,p2pp+2
return
updatescreen:
sync
return
`========================
scoring:
if scoreto=1 then p1Score=p1Score+pot
if scoreto=2 then p2Score=p2Score+pot
ballx=320
bally=240
balldirx=1
balldiry=1
phase=1 ` phase1|--> phase-1|<--
Ballspeed#=1
pot=0
sleep 2000
return
thanks for all the help so far.