Im hoping someone out there could help me out with my game project im making a sorta space invader game where im trying to find a script that'll make my sprite move along the screen in a straight line and when it gets to edge of screen move down a few steps then back along the screen, but I also want teh sprite to randomly drop down the screen! Is this possible? Any help would be much appreciated.
Offline
here's one way to do it:
when i receive [spawn guy v]
go to x: [-200] y: [150]
repeat until <(y position) < [-149] >
repeat until <touching [edge v]?>
change x by [25]
repeat [10]
check if hit
end
if <(pick random [1] to [20]) = [1]>
change y by [-50]
end
end
change x by [-25]
change y by [-50]
repeat until <touching [edge v]?>
change x by [-25]
repeat [10]
check if hit
end
if <(pick random [1] to [20]) = [1]>
change y by [-50]
end
end
change x by [25]
change y by [-50]
end
Offline