CPU controlled movement for enemy
Posted: Mon Dec 01, 2014 9:53 am
My code for creating an enemy at a random location on the top of the screen now works but I can't get the enemy to move down the screen, this is what I've got so far;
Many thanks. Samm.
Code: Select all
on moveAlien
if moveEnemy = true then
send this to me in 10 millisecs
set the top of image "alienEnemy" to (the bottom of image"alienEnemy" + 2)
if the top of image "alienEnemy" >= 400 then
delete image"alienEnemy"
put false into moveEnemy
//put (lives - 1) into lives
put false into alienEnemy
end if
end if
end moveAlien