Home
Fusion 2.5+
Firefly+
Tutorials+
Videos+
Guides & Tips+
Extensions
Versions
Teaching


Enemy attack

Enemy attack


Torpedo movement


The enemy boats must also shoot at us. Go back to the frame editor, and drop on the surface of the sea, the object named "torpedo_ennemy" a small object (do not loose track of it in the editor!). For the submarine torpedo, choose a path movement for this object, and enter a straight-line movement from top to bottom. The object must accelerate as it gets close to the bottom of the screen, giving the impression it gets closer to us. The movement must be synchronised with the animation.

 

Firing


Enter the following events to make the enemy ships shoot at us. You will notice that we test the position of the boat to make sure it does not shoot when it lays in an unaccessible area of the screen.

  • Every 01"-00

+ Random(100) >= 60

+ Pick one of (warship01S)

+ X position of (warship01S) >= 320

+ X position of (warship01S) <= 960

: Create (torpedo_enemy) at (0,2) from (warship01S)

(torpedo_enemy) : Bring to back

Destroying torpedoes


When the submarine torpedo reaches the enemy torpedo, both must be destroyed. This is done with this simple event :

  • Collision between (torpedo_player) and (torpedo_enemy)

(torpedo_player) : Destroy

(torpedo_enemy) : Destroy

(Player 1) : Add 1500 to Score

The torpedo has reached its target


When the torpedo reaches the end of its path, it means that it has reached its destination and that our submarine is destroyed. We must subtract one to the number of lives.

  • (torpedo_enemy) has reached the end of its path

(torpedo_enemy) : Destroy

(Player 1) : Subtract 1 from Number of Lives




Spread the word!



You can share this document using the following buttons.




Submit your own User Tip