These are the scripts to make a nearest enemy detector. Basically the cannon finds the neatest enemy and points towards it. These scripts would be useful for a tower defense type game.