Discuss Scratch

swordslasher_1290
Scratcher
48 posts

alien invaders

how do i get the bomb to fall again and again?
dimitrip
Scratcher
500+ posts

alien invaders

Hi,
If it's one bomb at a time, just reposition it above (go to Y=170) each time it hits the bottom of the screen or your ship.
If you want several bombs to be active and visible at the same time on the screen then you'll need to create bomb clones.
For instance every second, you create a new clone, that you position above, with the same script for it to fall down like you already have.
Greetz,
Dimitri
The_Imaginarium
Scratcher
1000+ posts

alien invaders

when green flag clicked
forever
wait (pick random (N :: #969696) to (N2 :: #969696)) secs//frequency
create clone of [myself v]
end

when I start as a clone
set [y speed v] to [0]//make sure this variable is 'for this sprite only'
go to x: (pick random (-230) to (230)) y: (200)//you can change
repeat until <(y position) < [-170]>
change [y speed v] by (-1)
change y by (y speed)
...//if it does something else too
end
delete this clone
swordslasher_1290
Scratcher
48 posts

alien invaders

thanks a lot!
swordslasher_1290
Scratcher
48 posts

alien invaders

It works so well!
-bloominq
Scratcher
87 posts

alien invaders

swordslasher_1290 wrote:

It works so well!
Glad these people could help! Is this topic resolved?
swordslasher_1290
Scratcher
48 posts

alien invaders

yep!

Powered by DjangoBB