ok i need help i have made the following
1. player with control ( there all sprites)
2. enemy a.i
3. a bullet that when it hits the a.i it hides it.
but i would like to not just hide the enemy a.i i would like to delete it. The only problem is everytime i chance my
if sprite collision (8,7) then hide sprite 7
to
if sprite collision (8,7) then delete sprite 7
the sprite just flash's then reapear's because the sprites are made within the main loop. ( so its deleting the sprite then remaking)
but i cannot take the sprites out of the loop because they dont move then it says ( sprite do's not exist at line 319 ) which is the if sprite collision line, all the enemy movement commands are within the loop.
can anyone lend me a hand without getting to tech as i'm stupid and easyly confused. thanx ok here is my code
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 "lazer1.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
load sound "phaser.wav",5
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
a=4
x9=100
y9=130
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
`enemy
sprite 3,x1,y1,3
sprite 4,x2,y2,3
sprite 5,x3,y3,3
sprite 7,x4,y4,3
hide sprite 8
if spacekey()=1 and fired=0 then move sprite 8,20
if spacekey()=1 and fired=0 then show sprite 8
if spacekey()=1 and fired=1 then delete sprite 8
if spacekey()=1 then play sound 5
`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
`player controls
if c=0
if upkey()=1 then a=1
if downkey()=1 then a=2
if leftkey()=1 then a=3
if rightkey()=1 then a=4
endif
if s=1 then inc y9,-8
if s=2 then inc y9,8
if s=3 then inc x9,-8
if s=4 then inc x9,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
if sprite collision (8,3) then hide sprite 3
if sprite collision (8,4) then hide sprite 4
if sprite collision (8,5) then hide sprite 5
if sprite collision (8,7) then hide sprite 7
sync
loop
and here is a pic of my game so far
plz help
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