Adding scripts to Spaceship Ammo and Enemy Ammo

The Spaceship sprite fights enemy sprites with Spaceship Ammo, and enemy sprites attack with the Enemy Ammo sprites.

Prepare for lift off

Spaceship Ammo has one local variable, speed. The speed variable is how fast this sprite moves. Upon creation, it flies out of the Spaceship sprite and moves straight up until it hits an enemy or the top edge of the Stage.

Prepare for lift off

The Enemy Ammo sprite is very similar to the Spaceship Ammo sprite and is different only in direction, hit target (the sprites it can hurt), and costumes.

Enemy Ammo moves down, but Spaceship Ammo moves up. Also, Enemy Ammo can hit the Spaceship and ...

Get Scratch 2.0 Game Development HOTSHOT now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.