Raffitz's Flashgate: Game Development
+17
Aomtte
Jim Russ
livi
Jerome Star
Earthdeath
Meganew Trek
Darkwing
leewatson1
Xel'Haddas
Galaxy-Scarface
JPB18
Shemuel
me naam is m
Karlo
paulwall99
Darkjedi
raffitz
21 posters
Page 2 of 4
Page 2 of 4 • 1, 2, 3, 4
Re: Raffitz's Flashgate: Game Development
Xel'Haddas wrote:Back to the flash itself.......
Is it possible to have Hive ships spawn/launch Darts when they see an enemy? We already have the docking fighters code itself for the player in place with Broken Mirror, but say all Hive ships had the same amount (5 or so?) except yours, which would have whatever you wanted in it. Would that be too far beyond our abilities (I am just making sure that it can be done)?
Paulwall, he didn't say anything about targeting, but anyways....
Yes, the player's docking fighters code is already in place, I know... It's very far beyond my actionscript capabilities, but I'll ask DW... I hope he reads this post, 'cause I'm not in the mood of PMing him...
Re: Raffitz's Flashgate: Game Development
i no i was egting to the point the ai can do do dif stuff than the player and vise versa
paulwall99- Ensign
- Number of posts : 448
Age : 31
Location : vista rules
Registration date : 2008-01-12
Re: Raffitz's Flashgate: Game Development
ooh, the AI. (shiver runs down spine) I confess, I don't really know anything about the AI
Re: Raffitz's Flashgate: Game Development
If I have direct, straight code, I might probably be able to program an A.I in Flash.
But, I have very little knowledge of Actionscript, nor do I have Flash. (Well, I don't have Flash anymore. Deleted.)
Is there any way of posting the Actionscript A.I source code here on the forum?
Man, if I could program this stuff from scratch...........
Just tell me if that's possible.
Note: Actionscript doesn't look that difficult to me.
It's sooo similar to Javascript, that I might pee myself.
But, I have very little knowledge of Actionscript, nor do I have Flash. (Well, I don't have Flash anymore. Deleted.)
Is there any way of posting the Actionscript A.I source code here on the forum?
Man, if I could program this stuff from scratch...........
Just tell me if that's possible.
Note: Actionscript doesn't look that difficult to me.
It's sooo similar to Javascript, that I might pee myself.
Re: Raffitz's Flashgate: Game Development
Hmm...
Sounds like I will need to (again) make an attempt to get Flash and (for the three-billionth time) make sure it works for my computer. But, alas, I don't have the RAM to do Flash easily without going at the speed of dead bunnies.
Let's stay off AI until we can find the AI code and such.
If anything, could the player have a weapon that spawns Dart-looking torpedoes (remember the kamikaze Darts from Atlantis Season 1's 'The Siege prt 3'?) that deal a light amount of damage but fire fast–and could it be spawned from the side of the Hive?
I hope my suggestions are good.
PS: A list of other ideas just for everyone to strike down if they feel like it or bring up:
Have Ori Supergates spawn Ori Motherships in their homeworld (say, only one Supergate exists, but it sends out a continuous stream of Ori vessels)
Darts use blue forward-firing weapons to replace the cannons found on Birds of Prey
replace the power upgrade found at the earth research station with a ZPM (Zero Point Module, just for laughs and a bit more connection)
Defense Stations use the Ori beam weapon (in the Stargate SG-1 season 9 episode 'Ethon' where a Prior gives the Rand Protectorate step-by-step instructions to build a Ori Beam firing station with a super shield)
Beam weapon destroys a Ha'tak vessel in one shot and the Prometheus with three (lets have the Ori weapon be expensive, eh?)
Any Lantean City-ship has three slots filled with fast-firing drones. Shield is MUCH higher, hull is low. Shield should look like a circle, not just wrapping around, eliminating the space between each extending part of the city.
There should be a system where the planet is a giant Atlantis, and the stations look like buildings on it.
Darts have no shields– Wraith vessels don't have any– or to make up for the Wraith's ability to regenerate hull, have almost all shields and barely any hull so that shield will pretend to be the hull healing.
Earth (under any AI nation) will fire a stream of drones at enemy ships within torpedo range (a continent is really just a station, say) and can be destroyed because it is a station.
Replicators automatically have the ability to colonize; they don't have a lack of skill in surviving because they need nothing but material to replicate.
The Nox have a world– they have a massive amount of power and have super-stations (massive shields and health) and all of their attack ships can cloak.
Everyone hates the Replicators. Replicators are a secret race (one of the three invisi-buttons for three special races)
Sounds like I will need to (again) make an attempt to get Flash and (for the three-billionth time) make sure it works for my computer. But, alas, I don't have the RAM to do Flash easily without going at the speed of dead bunnies.
Let's stay off AI until we can find the AI code and such.
If anything, could the player have a weapon that spawns Dart-looking torpedoes (remember the kamikaze Darts from Atlantis Season 1's 'The Siege prt 3'?) that deal a light amount of damage but fire fast–and could it be spawned from the side of the Hive?
I hope my suggestions are good.
PS: A list of other ideas just for everyone to strike down if they feel like it or bring up:
Have Ori Supergates spawn Ori Motherships in their homeworld (say, only one Supergate exists, but it sends out a continuous stream of Ori vessels)
Darts use blue forward-firing weapons to replace the cannons found on Birds of Prey
replace the power upgrade found at the earth research station with a ZPM (Zero Point Module, just for laughs and a bit more connection)
Defense Stations use the Ori beam weapon (in the Stargate SG-1 season 9 episode 'Ethon' where a Prior gives the Rand Protectorate step-by-step instructions to build a Ori Beam firing station with a super shield)
Beam weapon destroys a Ha'tak vessel in one shot and the Prometheus with three (lets have the Ori weapon be expensive, eh?)
Any Lantean City-ship has three slots filled with fast-firing drones. Shield is MUCH higher, hull is low. Shield should look like a circle, not just wrapping around, eliminating the space between each extending part of the city.
There should be a system where the planet is a giant Atlantis, and the stations look like buildings on it.
Darts have no shields– Wraith vessels don't have any– or to make up for the Wraith's ability to regenerate hull, have almost all shields and barely any hull so that shield will pretend to be the hull healing.
Earth (under any AI nation) will fire a stream of drones at enemy ships within torpedo range (a continent is really just a station, say) and can be destroyed because it is a station.
Replicators automatically have the ability to colonize; they don't have a lack of skill in surviving because they need nothing but material to replicate.
The Nox have a world– they have a massive amount of power and have super-stations (massive shields and health) and all of their attack ships can cloak.
Everyone hates the Replicators. Replicators are a secret race (one of the three invisi-buttons for three special races)
Xel'Haddas- Passenger
- Number of posts : 99
Location : Somewhere on Atlantis, making ZPMs have happy time buttons just so they can be fusion bombs
Registration date : 2008-05-08
Re: Raffitz's Flashgate: Game Development
Yeah, right, lots of stuff... I'll take some of the ideas into consideration... But look... That three invisibutton thing is no longer in place, as I already told people how secret races are going to work... (see previous posts and the old topic)...
Re: Raffitz's Flashgate: Game Development
DJ, here you go!
(WARNING: LARGE piece of code)
(in 4 posts)
Object 'othership', frame 1, layer 1.
(WARNING: LARGE piece of code)
(in 4 posts)
Object 'othership', frame 1, layer 1.
- Code:
set("shields" add ":mytype", mytype);
set("shiptype" add ":mytype", mytype);
if (_root.speed != 0) {
_x = _x+_root.locx;
_y = _y+_root.locy;
}
if (speed == undefined) {
var speed = 0;
var enginefail = 0;
}
//randomly leave the system
if (random(5000) == 1 and mytype<=69 and _root.shipsgovt[myslot] != 16) {
if (myx>-50 and myy>-50 and myy<550 and myx<700) {
_root.enterwarp.start();
}
gotoAndPlay(14);
}
//if ally, target is me
//check for nearby enemies
var myx = getProperty("../" add myself, _x);
var myy = getProperty("../" add myself, _y);
if (xArray2 == undefined) {
var xArray2 = 0;
}
if (xArray2>_root.xArray0) {
//reset then look at player
var xArray2 = 0;
var ex = getProperty("../player", _x);
var ey = getProperty("../player", _y);
if ((Math.abs(ex-myx)<500/_root.zoom) and (Math.abs(ey-myy)<500/_root.zoom) and hailplayer == 1) {
set("../playerpanel" add ":infotext", "The "+myname+" is hailing you...");
_root.comm.start();
var hailplayer = 2;
}
if (_root.shipsgovt[myslot] == 15 and eval("_root.player.playershiptype.cloak") != 1) {
mytarget = "player";
set("../" add myblip add ":mydist", 7);
alert = 3;
}
if (Math.abs(ex-myx)<1000/_root.zoom and Math.abs(ey-myy)<1000/_root.zoom and _root.localprestige[_root.myplanet]<0 and mytarget != "player" and _root.shipsgovt[myslot] == _root.planetArray[1] and eval("_root.player.playershiptype.cloak") != 1) {
mytarget = "player";
set("../" add myblip add ":mydist", 7);
alert = 3;
}
}
var ex = getProperty(_root.otherships[xArray2], _x);
var ey = getProperty(_root.otherships[xArray2], _y);
if (myself != _root.otherships[xArray2]) {
if ((_root.shipsgovt[xArray2] == _root.planetGovts[_root.myplanet+55] and _root.shipsgovt[myslot] == _root.planetGovts[_root.myplanet]) or (_root.shipsgovt[xArray2] == _root.planetGovts[_root.myplanet] and _root.shipsgovt[myslot] == _root.planetGovts[_root.myplanet+55]) or (eval("../" add _root.otherships[xArray2] add ".mytarget") == "player" and _root.shipsgovt[xArray2] != 16 and _root.shipsgovt[myslot] == 16) or (_root.shipsgovt[xArray2] == 15 and _root.shipsgovt[myslot] != 15)) {
if (Math.abs(ex-myx)<800 and Math.abs(ey-myy)<800) {
set("../playerpanel" add ":infotext", "Sensors detect weapons fire in this system...");
mytarget = _root.otherships[xArray2];
set("../" add _root.otherships[xArray2] add ":mytarget", myself);
alert = 3;
set("../" add _root.otherships[xArray2] add ":alert", 3);
}
}
}
xArray2++;
//set random location for ship to dock at target
if (random(50) == 1) {
x = (random(500)-random(500))/_root.zoom;
y = (random(500)-random(500))/_root.zoom;
}
if (mytarget != undefined) {
var targetx = getProperty("../" add mytarget, _x)+x;
var targety = getProperty("../" add mytarget, _y)+y;
}
//fly to a target
if (mytype<=69 and enginefail<1) {
var myRadians = Math.atan2(targety-_y, targetx-_x);
var myDegrees = Math.round((myRadians*180/Math.PI));
var rotation = myDegrees;
var r1 = 0;
var r2 = Math.abs(rotation-_rotation)+90;
if (r2>360) {
r2 -= 360;
}
if (r2>180 and (Math.abs(r2-180)>10 and (r2>10 and r2<350))) {
_rotation -= totturn;
} else if (r2<180 and (Math.abs(r2-180)>10 and (r2>10 and r2<350))) {
_rotation += totturn;
}
if (r2>120 and r2<200) {
setspeed = 5/_root.zoom;
}
if ((Math.abs(myx-targetx)<1000/_root.zoom) and (Math.abs(myy-targety)<1000/_root.zoom)) {
setspeed = Math.abs(myx-targetx)/40;
}
if ((Math.abs(myx-targetx)>500/_root.zoom) and (Math.abs(myy-targety)>500/_root.zoom)) {
setspeed = totspeed/_root.zoom;
}
if (speed<0 or setspeed<0) {
setspeed = 0;
speed = 0;
}
if (speed<setspeed) {
speed += 3/_root.zoom;
}
if (speed>setspeed) {
speed -= 3/_root.zoom;
}
_x += Math.sin(_rotation*(Math.PI/180))*(speed/_root.zoom);
_y += Math.cos(_rotation*(Math.PI/180))*(speed/_root.zoom)*-1;
}
//cloak the ship
if (Number(_root.itemdescArray[((mytype-1)*13)+13]) == 22) {
if (random(100) == 1) {
cloak = 1;
}
if (random(5000) == 1) {
cloak = 0;
}
}
if (cloak == 1 and ((_alpha>=5 and _root.shipsgovt[myslot] != 16) or (_alpha>25 and _root.shipsgovt[myslot] == 16))) {
_alpha -= 5;
setProperty("../" add myblip, _alpha, _alpha);
}
if (cloak == 0 and _alpha<100) {
_alpha += 5;
setProperty("../" add myblip, _alpha, _alpha);
}
//restore engines
if (enginefail>0) {
enginefail -= 1;
}
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
object 'othership', frame 2, layer 1.
- Code:
set("shields" add ":mytype", mytype);
set("shiptype" add ":mytype", mytype);
if (_root.speed != 0) {
_x = _x+_root.locx;
_y = _y+_root.locy;
}
if (speed == undefined) {
var speed = 0;
var enginefail = 0;
}
//randomly leave the system
if (random(5000) == 1 and mytype<=69 and _root.shipsgovt[myslot] != 16) {
if (myx>-50 and myy>-50 and myy<550 and myx<700) {
_root.enterwarp.start();
}
gotoAndPlay(14);
}
//if ally, target is me
//check for nearby enemies
var myx = getProperty("../" add myself, _x);
var myy = getProperty("../" add myself, _y);
if (xArray2 == undefined) {
var xArray2 = 0;
}
if (xArray2>_root.xArray0) {
//reset then look at player
var xArray2 = 0;
var ex = getProperty("../player", _x);
var ey = getProperty("../player", _y);
if ((Math.abs(ex-myx)<500/_root.zoom) and (Math.abs(ey-myy)<500/_root.zoom) and hailplayer == 1) {
set("../playerpanel" add ":infotext", "The "+myname+" is hailing you...");
_root.comm.start();
var hailplayer = 2;
}
if (_root.shipsgovt[myslot] == 15 and eval("_root.player.playershiptype.cloak") != 1) {
mytarget = "player";
set("../" add myblip add ":mydist", 7);
alert = 3;
}
if (Math.abs(ex-myx)<1000/_root.zoom and Math.abs(ey-myy)<1000/_root.zoom and _root.localprestige[_root.myplanet]<0 and mytarget != "player" and _root.shipsgovt[myslot] == _root.planetArray[1] and eval("_root.player.playershiptype.cloak") != 1) {
mytarget = "player";
set("../" add myblip add ":mydist", 7);
alert = 3;
}
}
var ex = getProperty(_root.otherships[xArray2], _x);
var ey = getProperty(_root.otherships[xArray2], _y);
if (myself != _root.otherships[xArray2]) {
if ((_root.shipsgovt[xArray2] == _root.planetGovts[_root.myplanet+55] and _root.shipsgovt[myslot] == _root.planetGovts[_root.myplanet]) or (_root.shipsgovt[xArray2] == _root.planetGovts[_root.myplanet] and _root.shipsgovt[myslot] == _root.planetGovts[_root.myplanet+55]) or (eval("../" add _root.otherships[xArray2] add ".mytarget") == "player" and _root.shipsgovt[xArray2] != 16 and _root.shipsgovt[myslot] == 16) or (_root.shipsgovt[xArray2] == 15 and _root.shipsgovt[myslot] != 15)) {
if (Math.abs(ex-myx)<800 and Math.abs(ey-myy)<800) {
set("../playerpanel" add ":infotext", "Sensors detect weapons fire in this system...");
mytarget = _root.otherships[xArray2];
set("../" add _root.otherships[xArray2] add ":mytarget", myself);
alert = 3;
set("../" add _root.otherships[xArray2] add ":alert", 3);
}
}
}
xArray2++;
//set random location for ship to dock at target
if (random(50) == 1) {
x = (random(500)-random(500))/_root.zoom;
y = (random(500)-random(500))/_root.zoom;
}
if (mytarget != undefined) {
var targetx = getProperty("../" add mytarget, _x)+x;
var targety = getProperty("../" add mytarget, _y)+y;
}
//fly to a target
if (mytype<=69 and enginefail<1) {
var myRadians = Math.atan2(targety-_y, targetx-_x);
var myDegrees = Math.round((myRadians*180/Math.PI));
var rotation = myDegrees;
var r1 = 0;
var r2 = Math.abs(rotation-_rotation)+90;
if (r2>360) {
r2 -= 360;
}
if (r2>180 and (Math.abs(r2-180)>10 and (r2>10 and r2<350))) {
_rotation -= totturn;
} else if (r2<180 and (Math.abs(r2-180)>10 and (r2>10 and r2<350))) {
_rotation += totturn;
}
if (r2>120 and r2<200) {
setspeed = 5/_root.zoom;
}
if ((Math.abs(myx-targetx)<1000/_root.zoom) and (Math.abs(myy-targety)<1000/_root.zoom)) {
setspeed = Math.abs(myx-targetx)/40;
}
if ((Math.abs(myx-targetx)>500/_root.zoom) and (Math.abs(myy-targety)>500/_root.zoom)) {
setspeed = totspeed/_root.zoom;
}
if (speed<0 or setspeed<0) {
setspeed = 0;
speed = 0;
}
if (speed<setspeed) {
speed += 3/_root.zoom;
}
if (speed>setspeed) {
speed -= 3/_root.zoom;
}
_x += Math.sin(_rotation*(Math.PI/180))*(speed/_root.zoom);
_y += Math.cos(_rotation*(Math.PI/180))*(speed/_root.zoom)*-1;
}
//cloak the ship
if (Number(_root.itemdescArray[((mytype-1)*13)+13]) == 22) {
if (random(100) == 1) {
cloak = 1;
}
if (random(5000) == 1) {
cloak = 0;
}
}
if (cloak == 1 and ((_alpha>=5 and _root.shipsgovt[myslot] != 16) or (_alpha>25 and _root.shipsgovt[myslot] == 16))) {
_alpha -= 5;
setProperty("../" add myblip, _alpha, _alpha);
}
if (cloak == 0 and _alpha<100) {
_alpha += 5;
setProperty("../" add myblip, _alpha, _alpha);
}
//restore engines
if (enginefail>0) {
enginefail -= 1;
}
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
object 'othership', frame 3, layer 1.
- Code:
//attack alert
if (_root.speed != 0) {
_x = _x+_root.locx;
_y = _y+_root.locy;
}
if (mystrength/totstrength*100<30 and random(10) == 1) {
_root.attachMovie("damagemini", "damage" add _root.level, _root.level);
setProperty("../damage" add _root.level, _x, _x+random(20)-random(20));
setProperty("../damage" add _root.level, _y, _y+random(20)-random(20));
_root.level++;
}
if (_alpha<100) {
cloak = 0;
_alpha += 5;
setProperty("../" add myblip, _alpha, _alpha);
}
//check for nearby enemies
var myx = getProperty("../" add myself, _x);
var myy = getProperty("../" add myself, _y);
//recheck for closest enemy
if (xArray2>_root.xArray0) {
//reset then look at player
var xArray2 = 0;
var ex = getProperty("../player", _x);
var ey = getProperty("../player", _y);
if (Math.abs(ex-myx)<1000/_root.zoom and Math.abs(ey-myy)<1000/_root.zoom and _root.localprestige[_root.myplanet]<0 and mytarget != "player" and _root.shipsgovt[myslot] == _root.planetArray[1] and eval("_root.player.playershiptype.cloak") != 1) {
mytarget = "player";
set("../" add myblip add ":mydist", 7);
alert = 3;
}
}
var ex = getProperty(_root.otherships[xArray2], _x);
var ey = getProperty(_root.otherships[xArray2], _y);
if (myself != _root.otherships[xArray2]) {
if ((_root.shipsgovt[xArray2] == _root.planetGovts[_root.myplanet+55] and _root.shipsgovt[myslot] == _root.planetGovts[_root.myplanet]) or (_root.shipsgovt[xArray2] == _root.planetGovts[_root.myplanet] and _root.shipsgovt[myslot] == _root.planetGovts[_root.myplanet+55]) or (eval("../" add _root.otherships[xArray2] add ".mytarget") == "player" and _root.shipsgovt[xArray2] != 16 and _root.shipsgovt[myslot] == 16) or (_root.shipsgovt[xArray2] == 15 and _root.shipsgovt[myslot] != 15)) {
if (Math.abs(ex-myx)<800/_root.zoom and Math.abs(ey-myy)<800/_root.zoom) {
mytarget = _root.otherships[xArray2];
set("../" add _root.otherships[xArray2] add ":mytarget", myself);
set("../" add _root.otherships[xArray2] add ":alert", 3);
}
}
}
xArray2++;
//doing my orders
if (_root.shipsgovt[myslot] == 16) {
if (orders == 4 and random(10) == 1 and _root.shipsgovt[eval("../" add _root.myselect add ".myslot")] != 16) {
mytarget = _root.myselect;
_root.gamedata2 = _root.shipsgovt[eval("../" add _root.myselect add ".myslot")];
}
if (orders == 3 and (mytarget == undefined or mytarget == "player" or mytarget == "planet")) {
//locate an enemy and go get him
var i = 1;
while (i<_root.xArray0) {
if (_root.shipsgovt[i] == _root.planetGovts[_root.myplanet] and _root.localprestige[_root.myplanet]<0 and _root.otherships[i] != undefined) {
mytarget = _root.otherships[i];
}
if (_root.shipsgovt[i] == _root.planetGovts[_root.myplanet+55] and _root.localprestige[_root.myplanet]>50 and _root.otherships[i] != undefined) {
mytarget = _root.otherships[i];
}
if (_root.shipsgovt[i] == 15 and _root.otherships[i] != undefined) {
mytarget = _root.otherships[i];
}
i++;
}
}
if (mytarget == undefined) {
mytarget = "planet";
alert = 1;
}
}
//targetting enemy - player is enemy
if (mytarget == "player") {
if (eval("_root.player.playershiptype.cloak") == 1) {
mytarget = "planet";
alert = 1;
}
if (_root.shipsgovt[myslot] == 16) {
set("../playerpanel" add ":infotext", "Captain, what are you doing?!?!?");
alert = 1;
} else {
set("../" add myblip add ":mydist", 7);
}
}
//make all others come rescue me
if (_root.shipsgovt[myslot] == _root.planetGovts[_root.myplanet] or _root.shipsgovt[myslot] == _root.planetGovts[_root.myplanet+55]) {
//check for nearby enemies
if (xArray3 == undefined) {
var xArray3 = 0;
}
var ex = getProperty("../" add _root.otherships[xArray3], _x);
var ey = getProperty("../" add _root.otherships[xArray3], _y);
if (myself != _root.otherships[xArray3]) {
if (_root.shipsgovt[xArray3] == _root.shipsgovt[myslot] and ex>0 and ey>0 and ex<600 and ey<450) {
set("../" add _root.otherships[xArray3] add ":mytarget", mytarget);
set("../" add _root.otherships[xArray3] add ":alert", 3);
}
}
xArray3++;
if (xArray3>_root.xArray0) {
var xArray3 = 0;
}
}
if ((mystrength/totstrength)*100>=5 and enginefail<1) {
//set random straffing
if (random(50) == 1) {
x = (random(800)-random(800))/_root.zoom;
y = (random(800)-random(800))/_root.zoom;
}
if (random(100) == 1) {
x = 0;
y = 0;
}
//weapon timers
if (weapon1timer>0) {
weapon1timer -= 1;
}
if (weapon2timer>0) {
weapon2timer -= 1;
}
if (speed == undefined) {
var speed = 0;
}
var myx = getProperty("../" add myself, _x);
var myy = getProperty("../" add myself, _y);
var targetx = getProperty("../" add mytarget, _x);
var targety = getProperty("../" add mytarget, _y);
if (targetx == undefined or mytarget == "planet") {
if (random(2) == 1) {
mytarget = _root.otherships[random(_root.numstations)];
} else {
mytarget = "planet";
}
mytarget = "planet";
alert = 1;
}
//remind the target that Im killing him
if (random(10) == 1) {
set("../" add mytarget add ":mytarget", myself);
set("../" add mytarget add ":alert", 3);
}
//get target to attack me if this is one of my ships
if (random(20) == 1 and _root.shipsgovt[myslot] == 16) {
set("../" add mytarget add ":mytarget", myself);
set("../" add mytarget add ":alert", 3);
}
if (mytarget != undefined) {
var targetx2 = getProperty("../" add mytarget, _x)+x;
var targety2 = getProperty("../" add mytarget, _y)+y;
}
if (weapon1timer<=0 or weapon1timer == undefined) {
if (((Math.abs(myx-targetx)<300/_root.zoom)) and ((Math.abs(myy-targety)<300/_root.zoom))) {
var w = Number(_root.itemdescArray[((mytype-1)*13)+11]);
//randomly leave the system if unarmed
if (random(200) == 1 and mytype<=69 and _root.shipsgovt[myslot] != 16 and w == 0) {
if (myx>-50 and myy>-50 and myy<550 and myx<700) {
_root.enterwarp.start();
}
gotoAndPlay(14);
}
//randomly assign a weapon to an unarmed station
if (w == 0 and mytype>=70 and wx == undefined) {
var wx = 1;
var w = random(13)+1;
}
weapontype = _root.weapontypes[w];
var x = Number(_root.itemdescArray[((mytype-1)*13)+3]);
if (x>=6) {
var x = 1;
}
weapon1timer = Number(_root.weaponstats[((w-1)*7)+6])*(6-x);
//fire phaser if equipped
if (w<=5 and w != 0) {
_root.attachMovie("phaser", "phaser" add _root.level, _root.level);
set("../phaser" add _root.level add ":mytarget", mytarget);
set("../phaser" add _root.level add ":power", Number(_root.weaponstats[((w-1)*7)+5])*Number(_root.itemdescArray[((mytype-1)*13)+3]));
set("../phaser" add _root.level add ":myorigin", myself);
set("../phaser" add _root.level add ":mytype", weapontype);
_root.level++;
}
//fire disruptor if equipped
if (w>=6) {
var x = 0;
var y = 0;
var straffe = 1;
_root.attachMovie("torpedo", "torp" add _root.level, _root.level);
set("../torp" add _root.level add ":mytarget", mytarget);
set("../torp" add _root.level add ":speed", speed);
setProperty("../torp" add _root.level, _x, myx);
set("../torp" add _root.level add ":power", Number(_root.weaponstats[((w-1)*7)+5])*Number(_root.itemdescArray[((mytype-1)*13)+3]));
setProperty("../torp" add _root.level, _y, myy);
setProperty("../torp" add _root.level, _rotation, _rotation+random(20)-random(20));
if (mytype>=70) {
var myRadians = Math.atan2(targety-_y, targetx-_x);
var myDegrees = Math.round((myRadians*180/Math.PI));
var trotation = myDegrees+90;
setProperty("../torp" add _root.level, _rotation, trotation);
}
set("../torp" add _root.level add ":myself", "torp" add _root.level);
set("../torp" add _root.level add ":mytype", weapontype);
_root.level++;
}
}
}
if (weapon2timer<=0 or weapon2timer == undefined) {
var w = Number(_root.itemdescArray[((mytype-1)*13)+12]);
var weapontype = _root.weapontypes[w];
var x = Number(_root.itemdescArray[((mytype-1)*13)+3]);
if (x>=6) {
x = 1;
}
var weapon2timer = Number(_root.weaponstats[((w-1)*7)+6])*(6-x);
if ((Math.abs(myx-targetx)<2000/_root.zoom) and (Math.abs(myy-targety)<2000/_root.zoom) and w != 0) {
_root.attachMovie("torpedo", "torp" add _root.level, _root.level);
set("../torp" add _root.level add ":mytarget", mytarget);
set("../torp" add _root.level add ":speed", speed);
set("../torp" add _root.level add ":power", Number(_root.weaponstats[((w-1)*7)+5])*Number(_root.itemdescArray[((mytype-1)*13)+3]));
setProperty("../torp" add _root.level, _x, myx);
setProperty("../torp" add _root.level, _y, myy);
myRadians = Math.atan2(targety-_y, targetx-_x);
myDegrees = Math.round((myRadians*180/Math.PI));
trotation = myDegrees+90;
setProperty("../torp" add _root.level, _rotation, trotation);
set("../torp" add _root.level add ":myself", "torp" add _root.level);
set("../torp" add _root.level add ":mytype", weapontype);
_root.level++;
}
}
//fly to a target
if (mytype<=69) {
var myRadians = Math.atan2(targety2-_y, targetx2-_x);
var myDegrees = Math.round((myRadians*180/Math.PI));
var rotation = myDegrees;
// convert to rotation value (angle in degrees or 0-360)
var r1 = 0;
var r2 = Math.abs(rotation-_rotation)+90;
if (r2>360) {
r2 -= 360;
}
if (r2>180 and (Math.abs(r2-180)>10 and (r2>10 and r2<350))) {
_rotation -= totturn;
} else if (r2<180 and (Math.abs(r2-180)>10 and (r2>10 and r2<350))) {
_rotation += totturn;
}
if (r2>120 and r2<200) {
var setspeed = 5/_root.zoom;
}
if ((Math.abs(myx-targetx)>3000/_root.zoom) and (Math.abs(myy-targety)>3000/_root.zoom)) {
_rotation = rotation+90+random(10)-random(10);
}
if ((Math.abs(myx-targetx)<400/_root.zoom) and (Math.abs(myy-targety)<400/_root.zoom)) {
var setspeed = Math.abs(myx-targetx)/25;
}
if ((Math.abs(myx-targetx)>400/_root.zoom) and (Math.abs(myy-targety)>400/_root.zoom)) {
var setspeed = totspeed/_root.zoom;
}
if ((Math.abs(myx-targetx)<200/_root.zoom) and (Math.abs(myy-targety)<200/_root.zoom)) {
var setspeed = 1/_root.zoom;
}
if (straffe == 1 and setspeed<20/_root.zoom) {
var setspeed = 20/_root.zoom;
}
if (speed<setspeed) {
speed += 5/_root.zoom;
}
if (speed>setspeed) {
speed -= 2/_root.zoom;
}
_x += Math.sin(_rotation*(Math.PI/180))*(speed/_root.zoom);
_y += Math.cos(_rotation*(Math.PI/180))*(speed/_root.zoom)*-1;
}
} else {
_rotation += 1;
}
//check for damage
if (hit>0) {
if (random(5) == 1 and mytarget == "player") {
blamedeath = 1;
}
if (mystrength<=0) {
gotoAndPlay(7);
// death code will be in this frame
}
if (mystrength/totstrength*100>50) {
set("shields" add ":fade", 1);
}
var hit = 0;
}
//check for boarding
if (board>0) {
var board = 0;
if (this.hitTest("../player") and mystrength/totstrength*100<5 and mytype<=69) {
if (_root.shipsgovt[myslot] == 12 or _root.shipsgovt[myslot] == _root.planetArray[1]) {
_root.localprestige[_root.myplanet] -= random(5);
}
if (_root.shipsgovt[myslot] == _root.planetArray[9]) {
_root.localprestige[_root.myplanet] += random(5);
}
var pilaged = random(500)+Number(_root.itemdescArray[((mytype-1)*13)+3]*20);
_root.board(pilaged, mytype);
}
}
//restore engines
if (enginefail>0) {
enginefail -= 1;
}
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
object 'othership', frame 4, layer 1.
object 'othership', frame 7.
it's in one of these pieces of code, but I dunno which one exactly.
(OMG! quadruple post! )
- Code:
if (_root.speed != 0) {
_x = _x+_root.locx;
_y = _y+_root.locy;
}
if (alert == 3 and _root.shipsgovt[myslot] == 16) {
}
gotoAndPlay(alert);
object 'othership', frame 7.
- Code:
if (_root.speed != 0) {
_x = _x+_root.locx;
_y = _y+_root.locy;
}
if (alert == 3 and _root.shipsgovt[myslot] == 16) {
}
gotoAndPlay(alert);
it's in one of these pieces of code, but I dunno which one exactly.
(OMG! quadruple post! )
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
Don't worry, you had to.
Meganew Trek- BANNED
- Number of posts : 2656
Age : 28
Location : The USS [strike]Dreadnought.[/strike] banned
Registration date : 2008-06-06
Re: Raffitz's Flashgate: Game Development
I know. just wanted to say that once.
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
Good for you.
Meganew Trek- BANNED
- Number of posts : 2656
Age : 28
Location : The USS [strike]Dreadnought.[/strike] banned
Registration date : 2008-06-06
Re: Raffitz's Flashgate: Game Development
OK, so, that was funny... So, can someone make something out of that?? LOLOLOLOL
Re: Raffitz's Flashgate: Game Development
well, it's actually in those posts only little. the AI itself is found mostly on the main frame. I know where it is, I can sort of read it, but I've never programmed it.
Re: Raffitz's Flashgate: Game Development
Ok, is there any way in which I can edit the ENTIRE source code in a text based format?Darkwing wrote:well, it's actually in those posts only little. the AI itself is found mostly on the main frame. I know where it is, I can sort of read it, but I've never programmed it.
Do you see where i'm goin with this?
Re: Raffitz's Flashgate: Game Development
you could use CC++, but that will get you the code... with a lot of bullpoop inbetween it.
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
well DJ, specially made for you:
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
I'm not a lazy bum all of the time.
Also, don't treat me like I'm an idiot.
You must be ill if you think you can do that.
Now, bend over!
I'm taking your temperature!
Note: I already know what C++ is. All I need to know is the coding modification specifications.
Also, don't treat me like I'm an idiot.
You must be ill if you think you can do that.
Now, bend over!
I'm taking your temperature!
Note: I already know what C++ is. All I need to know is the coding modification specifications.
Re: Raffitz's Flashgate: Game Development
Darkjedi wrote:I'm not a lazy bum all of the time.
Also, don't treat me like I'm an idiot.
You must be ill if you think you can do that.
Now, bend over!
I'm taking your temperature!
Note: I already know what C++ is. All I need to know is the coding modification specifications.
I'm too evil today.
(note) either your thermometer will freeze, or melt. anti-christ, remember?
somewhere there's the option 'choose programming language'
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
Well, thank you!
I'll take a look at this.....
:darkjedi uses google:
Note: I always use Google anyways. LOL!
Oh, and your temperature is normal.
Wait....
Dang it!
Your butt sucked up the thermometer!!!
Ahh, :darkjedi puts on medical gloves:
I'll take a look at this.....
:darkjedi uses google:
Note: I always use Google anyways. LOL!
Oh, and your temperature is normal.
Wait....
Dang it!
Your butt sucked up the thermometer!!!
Ahh, :darkjedi puts on medical gloves:
Re: Raffitz's Flashgate: Game Development
LOL?!?!?!?!?! That's twisted and disgusting, DJ, though funny...
Re: Raffitz's Flashgate: Game Development
haha! sucked up by the hellhole!
*Punches DJ flat in the face*
I'm not gay, remember that.
besides, you're not my type. I like innocent angels.
*Punches DJ flat in the face*
I'm not gay, remember that.
besides, you're not my type. I like innocent angels.
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
shouldnt stuff like this go in the role playing section?
Galaxy-Scarface- Lt. Commander
- Number of posts : 3090
Age : 28
Location : Detroit
Registration date : 2008-07-06
Re: Raffitz's Flashgate: Game Development
No, not at all, they're not playing anything, they're just being randomly off-topic... I won't lock nor delete this thread, but I may send those posts somewhere else...
Re: Raffitz's Flashgate: Game Development
It's a contagious disease... don't come close to me!!!raffitz wrote:randomly off-topic...
(OK. I got the message. back on topic.)
@ DW: where in the mainframe is the code then???
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
In the play screen (scene: "Game"), in one of the actionscript layers and frames, there's something about spawning the other ships...
Re: Raffitz's Flashgate: Game Development
wait a minute..are you saying that you can spawn ships?
Earthdeath- Commander
- Number of posts : 7919
Age : 53
Location : UK
Registration date : 2008-04-18
Re: Raffitz's Flashgate: Game Development
No, in th game's code, there's this spawn ship code that spawns the npc ships. It's what allows other ships besides the player's to exist ingame.... If that piece of code didn't exist, the Flash Trek galaxy would be an empty one...
Re: Raffitz's Flashgate: Game Development
but you could, with the right skill, edit it and link it to a button and menu system to spawn any ship you want in the game.unless there is something preventing you from doing that.
Earthdeath- Commander
- Number of posts : 7919
Age : 53
Location : UK
Registration date : 2008-04-18
Re: Raffitz's Flashgate: Game Development
Yes, I could, but the spawning itself wouldn't be the problem... I had to associate every parameter of the code with a variable, and then I'd have to create a graphic menu with buttons manipulating all those variables.... I lack skills to do that, and even if I had those skills, the whole process would be very troublesome...
Re: Raffitz's Flashgate: Game Development
this is a call for...a super modder!or vex to get up off his arse and do something
Earthdeath- Commander
- Number of posts : 7919
Age : 53
Location : UK
Registration date : 2008-04-18
Re: Raffitz's Flashgate: Game Development
I wouldn't bet my life over that... Vex's bum has been getting bigger and bigger, the more time he sits doing anything (Hey, Vex, if you're reading this, I'm joking.... I know you're probably busy with a job, or anything)...
Re: Raffitz's Flashgate: Game Development
dude...your scared of vex?whats he going to do, recite flash scripts?
Earthdeath- Commander
- Number of posts : 7919
Age : 53
Location : UK
Registration date : 2008-04-18
Re: Raffitz's Flashgate: Game Development
I'm not scared of him, I just don't want to offend him... After all, if it wasn't for him, what would we all be doing here?
Re: Raffitz's Flashgate: Game Development
talking about Gateflash on the trekflash forum owned by wingdark.
Earthdeath- Commander
- Number of posts : 7919
Age : 53
Location : UK
Registration date : 2008-04-18
Re: Raffitz's Flashgate: Game Development
I didn't really follow your line of thought there... Care to explain??
Re: Raffitz's Flashgate: Game Development
hm, never mind.i forget im the retarded one...probably because im a bit sedated right now.
Earthdeath- Commander
- Number of posts : 7919
Age : 53
Location : UK
Registration date : 2008-04-18
Re: Raffitz's Flashgate: Game Development
gateflash=flashgate trekflash=flashtrek wingdark=darkwing
Galaxy-Scarface- Lt. Commander
- Number of posts : 3090
Age : 28
Location : Detroit
Registration date : 2008-07-06
Re: Raffitz's Flashgate: Game Development
good, someone understood it.
Earthdeath- Commander
- Number of posts : 7919
Age : 53
Location : UK
Registration date : 2008-04-18
Re: Raffitz's Flashgate: Game Development
it wouldn't be that hard to make spawning ships. just manipulate the code for buying ships, so that you open up a menu with every ship in the game, and each ship costs 0 bars of latinum
Re: Raffitz's Flashgate: Game Development
hello uber fleet..but anyway, this is slightly off topic.
Earthdeath- Commander
- Number of posts : 7919
Age : 53
Location : UK
Registration date : 2008-04-18
Re: Raffitz's Flashgate: Game Development
raffitz wrote:No, in th game's code, there's this spawn ship code that spawns the npc ships. It's what allows other ships besides the player's to exist ingame.... If that piece of code didn't exist, the Flash Trek galaxy would be an empty one...
oh? I NEED that code! I've been searching it for a while already now!
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
Galaxy-Scarface wrote:gateflash=flashgate trekflash=flashtrek wingdark=darkwing
Earthdeath wrote:good, someone understood it.
I had understood that part, I just don't understand why you did that.... What I read there is: If Vex hadn't made FlashTrek, then Darkwing, whose username would be Wingdark (due to some alternate-timeline-ish event related to the not-creation of FlashTrek) would create a flash game named Trek Flash and then I, raffitz, would create a mod of Trek Flash named GateFlash... I'm not dumb, you know, and besides, I have a lot of Alternate Timeline experience thanks to all the sci-fi shows I watch....
Re: Raffitz's Flashgate: Game Development
you only need to watch one... ST or ehm... TS? but anyway, that will create enough headaches to keep you busy.
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Re: Raffitz's Flashgate: Game Development
"Must I say young man that your language is indiscriminate and that your behaviour is improper for your age of all types..."
LOL is this what a nanny says???
ok anyways Flash Gate is a different game but related to Flash Trek and therefore there must be significant differences... like change the Sub space comunicator to inter galactic space comunicator whatseoever...
LOL is this what a nanny says???
ok anyways Flash Gate is a different game but related to Flash Trek and therefore there must be significant differences... like change the Sub space comunicator to inter galactic space comunicator whatseoever...
Re: Raffitz's Flashgate: Game Development
Karlo wrote:"Must I say young man that your language is indiscriminate and that your behaviour is improper for your age of all types..."
LOL is this what a nanny says???
WTF???
me naam is m- Commander
- Number of posts : 9981
Registration date : 2007-12-26
Page 2 of 4 • 1, 2, 3, 4
Similar topics
» JPB18's Flashgate: Game Development
» raffitz's Flashgate
» Flashgate - The Game
» JPB's Flashgate - Remake
» Flashgate Finished?
» raffitz's Flashgate
» Flashgate - The Game
» JPB's Flashgate - Remake
» Flashgate Finished?
Page 2 of 4
Permissions in this forum:
You cannot reply to topics in this forum