This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-02-13 21:08:08

ferretron5
Scratcher
Registered: 2010-02-13
Posts: 10

i need really big help with scripting this game star fox 2-D

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

 

#2 2010-02-14 00:08:31

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: i need really big help with scripting this game star fox 2-D

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.  smile

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.  smile


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

Board footer