Pages: 1
Topic closed
Basically, you need a sprite (or sprites) to represent the bullets/arrows/whatever.
You need a way to tell to is sprite when to move, and in what direction, and how fast.
Then the bullet needs to know when it has hit the target or the edge of the screen, and the target needs to know it has been hit and react accordingly.
There are several different ways of doing this, and it depends on the nature of your game.
Have a look in my projects for anything titled Bow and arrow", "semaj's aeroplane game" or "multiple bullet demo" for some ideas.
Offline
There is another, simpler approach to shooting: lasers.
For these, you just switch to a costume with the laser beam on, and detect the laser beam touching another sprite in any of a number of ways (position, color over color, sprite touching sprite, ...) My son has done a number of simple shooting games this way, though none were ones he thought good enough to put up on the scratch web site.
We have one of them on our web site http://www.soe.ucsc.edu/~karplus/scratch_programs/ShootKevin.php
Offline
Topic closed
Pages: 1