Pages: 1
Topic closed
this is how the game works i have a 2-D space ship sprite it is controled by the arrow keys and you click 2 shoot and it is played on a moving space background with enemies ship sprites flying at it. Then after level one a cutscene shows and level 2 appears. does anyone know any scripts for this!? please help
Offline
For the ship to move, a simple way to do it is this:
When up arrow key pressed
change y by 3
And so on, but the scripting isn't recommended... it gives rather poor performance. Using the sensing blocks works better.
To shoot, do this:
When Green Flag Clicked
forever
if mouse down
broadcast [fire]
endif
endforever
The laser sprites will receive the broadcast, and you could try this:
When I receive [fire]
go to spaceship
repeat until touching edge or any enemies
change y by 3
end repeat
For the moving, scrolling would be the best. Make two sprites, and scroll them along the background to create the illusion of motion.
Explaining scrolling here would be difficult, but you can try searching for a nice tutorial.
For the cutscene, have it wait until the first level has been completed. For example, if a boss has been destroyed, it broadcasts something to the cutscene.
The cutscene can be an animation involving multiple sprites or a single sprite with many costumes. Once it's finished, it broadcasts something to level two, which begins.
I'm sorry if it was vague, but I'm not exactly sure how the game should be done... but the scripting should work.
Offline
Topic closed
Pages: 1