ive added a command that will place the enemy sprite back at the top of the screen once it has gone off the screen
Enemy_move:
// Move enemy down the screen at same rate
enemyy=enemyy+1
//Move the enemy left or right
If enemy_direction=4 and enemyx>GetVirtualWidth()-GetSpriteWidth(3)
enemy_direction=-4
endif
//enemyx=enemyx+enemy_direction
If enemy_direction=-4 and enemyx<0
enemy_direction=4
endif
enemyx=enemyx+enemy_direction
SetSpritePosition(3,enemyx,enemyy)
//gets the maximum device heighth and adds a value to make sure its off the screen
if enemyy>GetMaxDeviceHeight()+10 then enemyy=0
return
To make a sprite die is a little harder but I usually use an array of some kind here is some idea code to help
type myEnemy
id as integer
image as integer
x as float
y as float
dead as integer
endtype
rem make 50 enemies
dim enemySprite[50] as myEnemy
rem setup all your enemies
for num= 1 to 50
.
.
.
enemySprite[num].dead=0
next num
rem now in your enemy movement routine
for num= 1 to 50
IF enemySprite[num].dead=0
Rem move the sprites that are alive
.
endif
.
next num
rem you could also use a counter variable that kept track of all the aliens
ie if counter>=50 then gosub setupandstartlevel2
hint:your collision routine should hide the sprite preferably after some kind of
death animation and set the dead flag to 1 on each dead one. then when you go to next
level again each alien has to have the dead flag set to zero
fubar