ok i just did a gosub command for the virus to be deleted outide my loop but obviously it ends my game because its a follow on subrouteine so i have this can anyone help correct me
thegame:
sync on
sync rate 30
delete object 1
delete object 2
hide mouse
load image "virus.jpg",3
Load image "alone.jpg",4
load image "lazer.jpg",8
Load image "target.jpg",1
Sprite 6,Screen Width()/2-16,Screen Height()/2-16,1 ; Hide Sprite 6
Make Object Box 6,1,1,1
Position Object 6,Screen Width()/2,Screen Height()/2,0
stop music 2
load music "full reflex.wav",3
load sound "hit2.wav",4
play music 3
loop music 3
load image "space.jpg",5
MAKE OBJECT cube 1,100
scale object 1,10,10,10
texture object 1,2
set object specular 1,2
set object cull 1,0
set object light 1,0
ghost object on 1
set cube mapping on 1,1,2,3,4,5,6
set object ambience 1,0
`the varibles
x=100
y=100
x1=550
y1=400
x2=550
y2=400
x2=550
y2=400
x10=100
y10=100
s=4
x9=200
y9=200
sprite 8,x9,y9,8
DO
YROTATE OBJECT 1,OBJECT ANGLE Y(1)+0.1
REM MOVEMENT OF TARGETER
Position Camera cPx#,cPy#,cPz#
Position Object 6,crPx#+mousemovex()*ms#,crPy#+mousemovey()*ms#,0
Paste Sprite 6,crPx#,crPy#
cPx#=Camera Position x() ; cPy#=Camera Position y() ; cPz#=Camera Position z()
crPx#=Object Position x(6) ; crPy#=Object Position y(6)
ms# = 0.6
`player
sprite 2,x,y,4
sprite 8,x9,y9,8
if spacekey()=1 and fired=0 then move sprite 8,20
`enemy
sprite 3,x1,y1,3
sprite 4,x2,y2,3
sprite 5,x3,y3,3
sprite 7,x4,y4,3
`see if they are touching
if x=x1 and y=y1 then play sound 4
if x=x2 and y=y2 then play sound 4
if x=x3 and y=y3 then play sound 4
if x=x4 and y=y4 then play sound 4
if x9=x1 and y9=y1 then gosub viruskill
if x9=x2 and y9=y2 then gosub viruskill
if x9=x3 and y9=y3 then gosub viruskill
if x9=x4 and y9=y4 then gosub viruskill
if x9=x1 and y9=y1 then play sound 4
if x9=x2 and y9=y2 then play sound 4
if x9=x3 and y9=y3 then play sound 4
if x9=x4 and y9=y4 then play sound 4
`player controls
if c=0
if upkey()=1 then s=1
if downkey()=1 then s=2
if leftkey()=1 then s=3
if rightkey()=1 then s=4
endif
if s=1 then inc y,-8
if s=2 then inc y,8
if s=3 then inc x,-8
if s=4 then inc x,8
`enemy controls
if x > x1 then inc x1,4
if x < x1 then dec x1,4
if y > y1 then inc y1,4
if y < y1 then dec y1,4
if x > x2 then inc x2,2
if x < x2 then dec x2,2
if y > y2 then inc y2,2
if y < y2 then dec y2,2
if x > x3 then inc x3,5
if x < x3 then dec x3,5
if y > y3 then inc y3,5
if y < y3 then dec y3,5
if x > x4 then inc x4,6
if x < x4 then dec x4,6
if y > y4 then inc y4,6
if y < y4 then dec y4,6
sync
loop
viruskill:
delete sprite 3
delete sprite 4
delete sprite 5
delete sprite 7
not sure what to do at this stage snce the loop has been broken after a sprite is killed can anyone lend a hand.?
i'm E.T i have so much tech but yet i dont have a mobile phone! where is a land line when you need one