Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-30-2008, 04:36 PM   #1
pradvan
Senior Member
 
Join Date: Sep 2005
Location: NYC
Posts: 250
Default [AS2] Shooting Projectile Bullets

This script shows you how to shoot projectile bullets from the player movieclip towards the mouse x & y position.

Player movie clip also rotates towards the mouse.

You can change weapon settings like:
  • Bullet Offset - This set the accuracy of the bullet
  • Bullet Life Timer - This sets the life span of the bullet based on frame rate
  • Bullet Speed - This sets the speed of the bullet
  • Reload Speed - This sets the reload speed of the weapon

Preview & Fla Download
game engine - shooting projectile bullets
__________________
FreeActionScript.com- AS2 & AS3 Game Tutorials, Samples, Source Files & Downloads

Last edited by pradvan; 08-02-2009 at 05:15 AM.
pradvan is offline   Reply With Quote
Old 10-30-2008, 06:31 PM   #2
neilmmm
Senior Member
 
neilmmm's Avatar
 
Join Date: Oct 2005
Location: dorset
Posts: 1,637
Default

another nice one pradvan

i like the random offset feature on the angle but personally i took it off the _x and _y so the bullet always looks like it comes out of the canon

I also added after the attach bullet
Code:
player_mc.swapDepths(_root.getNextHighestDepth());
so the bullet only ever appears after it has exited the gun - just some thoughts -
neilmmm is offline   Reply With Quote
Old 10-30-2008, 06:47 PM   #3
pradvan
Senior Member
 
Join Date: Sep 2005
Location: NYC
Posts: 250
Default

Quote:
Originally Posted by neilmmm View Post
I also added after the attach bullet
Code:
player_mc.swapDepths(_root.getNextHighestDepth());
so the bullet only ever appears after it has exited the gun - just some thoughts -
Thanks dude! I didn't think about that one. Good tip.

Lasers and missiles next!
__________________
FreeActionScript.com- AS2 & AS3 Game Tutorials, Samples, Source Files & Downloads
pradvan is offline   Reply With Quote
Old 10-30-2008, 11:58 PM   #4
neilmmm
Senior Member
 
neilmmm's Avatar
 
Join Date: Oct 2005
Location: dorset
Posts: 1,637
Default

look forward to it
neilmmm is offline   Reply With Quote
Old 11-03-2008, 10:45 AM   #5
Hackor Pickel
don't eat me!
 
Join Date: Sep 2008
Posts: 75
Default

nice one pradvan
Hackor Pickel is offline   Reply With Quote
Old 11-18-2008, 07:03 PM   #6
pradvan
Senior Member
 
Join Date: Sep 2005
Location: NYC
Posts: 250
Default

Just added a flash laser weapon script

Same deal as before; you can paly with the following settings:
* reload speed
* laser offset
* laser width
* laser color
* laser alpha
__________________
FreeActionScript.com- AS2 & AS3 Game Tutorials, Samples, Source Files & Downloads

Last edited by pradvan; 08-02-2009 at 05:17 AM. Reason: updated link
pradvan is offline   Reply With Quote
Old 11-20-2008, 12:55 PM   #7
yogsmca
Banned by AS.org Staff
 
Join Date: Nov 2008
Posts: 28
Default hi flash game

hi can u help me for my shooting game project get me ur messenger id ill contact u and pay u for that....
yogsmca is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[AS2] Help with turret shooting crosshair Gaming and Game Development 10 10-09-2008 03:18 PM
[AS2] Shooting the Aliens with a Gun seekerofknowledge Gaming and Game Development 3 09-26-2008 05:06 PM
[AS2] Shooting Game Help!!! Bigmenn Gaming and Game Development 0 09-11-2008 03:06 AM
Bullets forced into input field formatting?! flashpipe Flash 8 General Questions 1 09-14-2006 04:15 PM
shooting Multiple bullets jasonpeinko ActionScript 1.0 (and below) 1 02-10-2006 03:46 AM


All times are GMT. The time now is 07:48 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.