Free ActionScript

Flash AS2 & AS3 Tutorials, Game Code, Effects, Source Files & Sample Downloads

Projectile Weapon

1 Comment »

AS3 update to my AS2 projectile weapon script. Features click-to-shoot (machine gun), collision detection, bullet gravity.

Available Settings

  • Bullet Speed – how fast the bullet travels
  • Max Distance – how far the bullet can go before dying
  • Reload Speed – how long it takes to reload the weapon
  • Barrel Length – how far from player does the bullet starts
  • Bullet Spread – how accurate does the bullet fly towards target
  • Gravity – gravity on/off


Download Fla Sample

Download Fla Sample

Advanced multi-barrel OOP version of this weapon script is now available here:

One Response

there’s some unnecessary codes.
ex:funciton checkCollisions(testX:Number, testY:Number):Boolean
u have stop loop using “return true”,so donnot need the next line “break;”

  • Leave a Reply

    You must be logged in to post a comment.