Seeker+Missile

Seeker Missile



The objective is to increase student understanding of the following programming:
 * Smell List (To search for agents)
 * Variables (to add and subtract values to)
 * Set Status (to display information on the command bar)
 * Agent Numbers (Individual for all agents of the same breed to tell them apart)

Seeker Missile Programming


 * 1) Create a **breed** to be your Seeker Missile. ( I have done this for you but you can change the breed if you wish)


 * 1) Create an **Agent Number** for each Alien in the Alien window. This will allow each Alien to have a personal identity number.




 * 1) **Create a Shared Number for the Seeker Missiles Available.** This variable will have numbers subtracted or added to it. This value can be used in various ways. In this case, we are limiting the number of Seeker Missiles to 1 and when fired the __Seeker Missiles Available__ value will be increased by -1.
 * 2) **Create a Procedure for Seeker Missile Hunting**. This will use the __Smell With__ to search around 50 spaces for any Aliens over a population number of 0. The Seeker Missile will then set a heading toward the nearest Alien on the __Smell List__. (The movement of the Seeker Missile __Forward__ is found in the **Alien Attack Forever Block** that you will put in later.)


 * 1) **You will have to add Controls to the Fighter for the Seeker Missile**. If the __Seeker Missiles Available__ is over 0, **hatch [Do]** a new fighter and turn the Fighter into a Seeker Missile with the characteristics below. After firing, the __Seeker Missiles Available__ will be increased by -1. (You will not have any more Seeker Missiles to use due to the __Seeker Missiles Available__ shared number is now set to 0.)




 * 1) In the **Fighter vs. Alien Setup**, place the set __Seeker Missiles Available__ number to a value of 1 (use only one Seeker Missile).




 * 1) In the **Alien Attack Forever block**: set the __Forward__ motion of Seeker Missile; add a call block to the __Seeker Missile Hunting__ procedure found in the Seeker Missile window; and __Set Status__ using text blocks to show the number of __Seeker Missiles Available__ on the command bar.




 * 1) **Add the Collision for Seeker Missile and Alien**. Provide the call block to the __Fighter Explosion__ procedure to show some special effects.