Game Weapons - Heat Seeking Missiles, Rockets, Torpedoes

Tuesday, December 16th, 2008 | Game Examples AS2, Game Weapons

This is a Flash ActionScript 2.0 heat seeking missile script for games. Includes AS2 dynamic smoke effects & dynamic animated explosion effects. Our missiles also need something to lock on to so I added a simple enemy random movement script.

Flash Game Weapon Preview

Download Fla Sample

Download Fla Sample

Customizable Missile Settings

  • reloadSpeed - how long it takes the missile launcher to reload
  • missileSpeed - how fast the missile travels
  • turnRate - how fast the missile turns toward the target

Customizable Explosion Settings

  • explosionParticleAmount - amount of explosion particles
  • explosionDistance - explosion spread distance
  • explosionSize - size of explosion particles
  • explosionAlpha - transparency of the explosion particles

If you’re having trouble understanding how this script works, please review previously posted examples that were incorporated in to this script: Animated Explosion Effect, Simple Random Enemy Movement, Enemy Follow Player, Realistic Smoke Effect - Particle Trailer & Play Random Sound.

Check out other free Flash game weapon effects from FreeActionScript.com:


Tags: , , , , , , , , , , , , , , , ,

8 Comments to Game Weapons - Heat Seeking Missiles, Rockets, Torpedoes

John
December 19, 2008

This is a great game development blog! Thank you for the great examples.

imoncloudnine69
January 16, 2009

Hey, so im borrow some of your code for my very first flash game. An offshoot of Raiden X. So far ive gotten the laser and the missles shooting and the ship following my mouse and all. what i really would like help with, is that your code creates missles that always go after a set enemy. could you help me modify code where the missle would go straight, unless there is an enemy on the screen, in which case the missles would go for the closest enemy on the screen (checking only once on click) and also helping me figure out how just to check if the laser hits any one of the enemies on the screen. here is what i have so far: rhsweb.org/kheath/RaidenHxC.zip

sajal das
January 17, 2009

thanks !!!!!!!!!!!!

imoncloudnine69
January 17, 2009

…continued…

Could you send me a modified code where “left click” creates and enemy, and “space bar” shoots. and the missle should track the closest enemy to it at the time. I simply cannot figure out how to keep track of all of the enemies on screen via an array, then refer to their image as to have the missile follow that instance.
email me at imoncloudnine69@hotmail.com
please and thank you sooo much.

http://rhsweb.org/kheath/shoot-at-closest-one.fla

cicla
January 18, 2009

man thanks for all of this! you shoudl put more ads on this site!!! im sure you will get tons of hits soon!!! THANKS :D

pradvan
January 20, 2009

John: Thank you very much!

imoncloudnine69: I actually need to write a “get closest enemy” function for my own game. I haven’t really given it much thought but it has been tickling my brain I’ll try to get around to it sometime this week and will look at your fla as well.

cicla: Gaming has been my passion for the longest time, and making my own games, or at least making game effects, engines, etc, really does give me pleasure.

I added a couple of google ads to help cover the hosting costs. However, I don’t plan on adding more ads as they can get annoying as hell. I don’t want to have “one of those” sites.

-PR

pradvan
January 21, 2009
TresDollares
August 11, 2009

this is so cool! but does this have an AS3 version? i recently learned AS3 and know nothing about AS2.. i am making my second game right now in AS3 and it would be cool if there was an AS3 version of this…

P.S. the heat-seeking missile and the smoke effect really make this cool!

Leave a comment

You must be logged in to post a comment.