HOME | DD

Preg-fur — Cannon WIP

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

BlackGun22 [2019-10-18 17:00:16 +0000 UTC]

Nice!

👍: 0 ⏩: 0

Usrailfan1 [2016-03-07 00:08:20 +0000 UTC]

pew pew pew

👍: 0 ⏩: 0

rikusorasephiroth [2015-08-11 04:10:05 +0000 UTC]

Just like Windforge... Almost... Kinda... ish.

👍: 0 ⏩: 0

SpectraFromBakugan [2013-08-04 21:22:20 +0000 UTC]

AWSOME!

 

👍: 0 ⏩: 0

Snowy-kun [2013-05-27 22:11:31 +0000 UTC]

This is interesting haha ^^

👍: 0 ⏩: 0

sharperofthefew [2013-05-27 11:46:52 +0000 UTC]

THIS IS SO ADDICTING XD

👍: 0 ⏩: 0

CloudchaserShaconage [2013-05-27 05:00:08 +0000 UTC]

That was a nice time user

👍: 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

FurryFreakLover In reply to Preg-fur [2013-05-27 04:27:09 +0000 UTC]

ok just checking

👍: 0 ⏩: 0

Gordo-Petunia [2013-05-26 23:12:03 +0000 UTC]

Lol...

👍: 0 ⏩: 0

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 02:48:13 +0000 UTC]

It's complicated

👍: 0 ⏩: 1

sheenufilms In reply to Preg-fur [2013-05-27 04:09:02 +0000 UTC]

That's okay!

👍: 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

069x-ray [2013-05-26 22:06:47 +0000 UTC]

Guns of Icarus much? lol!

👍: 0 ⏩: 0