how exactly are you getting the ammo to fire in the direction that your cannon is firing. in my game my ship can move any where on the screen and i want the ammo to fire in the direction that the nose of the ship is pointing.
for(var i:Number = 0; i < bullets.length; i++) { if(bullets[i].Update()) { drawTarget.removeChild(bullets[i]); bullets.splice(i, 1); i--; // <- if you delete a part of the array and splice it one bullet don't update. for example (bullet[20] will be deleted and bullet[21] is after the splice the number 20 but the i is now 21 because of the i++. } }
congrats! great job man, that's really cool, i'm starting in actionscript, and it's being hard for me, can you give an advice for improving it!? cheers!
I am not using the mouse, i am using the arrow keys
elderjoe1 3 days ago
how exactly are you getting the ammo to fire in the direction that your cannon is firing. in my game my ship can move any where on the screen and i want the ammo to fire in the direction that the nose of the ship is pointing.
elderjoe1 3 days ago
I know the problem of the bullet bug =)
for(var i:Number = 0; i < bullets.length; i++) { if(bullets[i].Update()) { drawTarget.removeChild(bullets[i]); bullets.splice(i, 1); i--; // <- if you delete a part of the array and splice it one bullet don't update. for example (bullet[20] will be deleted and bullet[21] is after the splice the number 20 but the i is now 21 because of the i++. } }
btw. nice tutorial thx
Clockdealer 3 months ago
awesome tut dude many thx :)
G0ld3nB4lls 1 year ago
Hey thanks a lot for throwing these together. Looking forward to any of your future projects you decide to post.
akashibito 1 year ago
congrats! great job man, that's really cool, i'm starting in actionscript, and it's being hard for me, can you give an advice for improving it!? cheers!
chapin1989 1 year ago
Great job dude :)
keep it up
ThefabolousOne 2 years ago