Code: Select all
on createalien
create invisible image "canvas.png"
set the loc of image "canvas.png" to (random(500),0)
//Undecied on size yet, Decide on size
set the width of "canvas.png" to 128
set the height of "canvas.png" to 32
movealien
end createalien
on movealien
if the visible of "canvas.png" is false then set the visible of image "canvas.png" to true
set the top of image "canvas.png" to (the bottom of image"canvas.png" + 2)
if the top of image "canvas.png" >= 582 then
delete image"canvas.png"
put (lives - 1) into lives
else
if checkalien() is true then
delete image "canvas.png"
-- hide group "enemy" with visual effect dissolve very fast
set the loc image "shooter" to (327,289)
send startalien to me in random(1000) milliseconds
exit movealien
end if
end if
if there is an image "canvas.png" then send movealien to me in 4 milliseconds
end movealien