HOME | DD

Published: 2013-05-26 20:08:54 +0000 UTC; Views: 7067; Favourites: 21; Downloads: 74
Redirect to original
Description
I love artillery... and archers... and musket units. Whenever I play a strategy/army game I always go for ranged units. I remember on Age of Empires 2, anyone ever play that game? I'd stockpile a ton of resources, kill all my villagers to free up my population cap, then make 4-50 men teams of fully upgraded Briton Longbowman. There's something to be said about all of them firing at once and seeing a square of densely packed arrows fly towards your opponent....Nostalgia aside, I made this cannon because I love artillery units as well, enjoy
Animation (C) me
Related content
Comments: 16
rikusorasephiroth [2015-08-11 04:10:05 +0000 UTC]
Just like Windforge... Almost... Kinda... ish.
👍: 0 ⏩: 0
FurryFreakLover [2013-05-26 23:18:29 +0000 UTC]
very fun. but i have noticed a few times the shots go straight through the airships, not often just a few.
👍: 0 ⏩: 1
Preg-fur In reply to FurryFreakLover [2013-05-27 02:47:35 +0000 UTC]
yup, the boat and balloon have separate hit areas(I made it like that), so it's possible to shoot between them.
👍: 0 ⏩: 1
sheenufilms [2013-05-26 22:35:44 +0000 UTC]
This is so cool! But how did you code for the shells?
👍: 0 ⏩: 1
Preg-fur In reply to sheenufilms [2013-05-27 16:05:10 +0000 UTC]
Please don't ask for an explanation, it'd take too long to explain.
function make_bullets()
{
var cannonball:MovieClip = new ball_mc();
cannonball.x = BarrelTipX;
cannonball.y = BarrelTipY;
addChildAt(cannonball, 0);
var bulletSpeed:int = speed;
var randomNum:int = Math.floor(Math.random() * accuracy + - (accuracy / 2));
var bulletAngle:Number;
var playerX:Number;
var playerY:Number;
var rotationDirection:Number;
cannonball.rotation = cannon.rotation;
bulletAngle = ((cannon.rotation+randomNum-180)*Math.PI/180);
var xSpeed:Number = Math.cos(bulletAngle) * bulletSpeed;
var ySpeed:Number = Math.sin(bulletAngle) * bulletSpeed;
var blimp_health:int = Math.floor(Math.random() *3 + 3);
cannonball.addEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler_2);
function fl_EnterFrameHandler_2(e:Event):void
{
var already_hitoolean = false;
e.target.x += xSpeed;
e.target.y += ySpeed;
if (e.target.y < 0)
{
e.target.y = 0;
e.target.play();
e.target.removeEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler_2);
}
if (e.target.x < 0)
{
e.target.x = 0;
e.target.play();
e.target.removeEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler_2);
}
if(blimp_hit.hitTestPoint(e.target.x, e.target.y, true) && !already_hit){
blimp.health_bar.scaleX -= (blimp_health/10);
e.target.play();
if(blimp.health_bar.scaleX < 0){
make_paracute();
make_paracute();
blimp.x = -55;
blimp_hit.x = -55;
blimp.health_bar.scaleX = 1;
blimp.y = Math.floor(Math.random() * 605 + 55);
}
already_hit = true;
e.target.removeEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler_2);
}
}
startReloading();
startEjecting();
cannon.play();
cannon.ammo_belt.play();
}
👍: 0 ⏩: 0