You have a hell lot of ideas and they're all pretty good ^^
Nice work, I look forward to see this completed.
So with Hephaestus and Hermes all but completed right now (Few more things to do and then it's all wah-wah-no gmod still etc.) I'm gonna go ahead and move into the next pairing of Olympus drones, Ares and Zeus.
Background
Zeus is the Olympus Technologies orbital laser, able to strike down with great vengeance and furious anger at whatever the Director or it feels deserves it.
So naturally, the big feature is the actual laser section. There's a ranger that extends to the maximum range of the laser (About 10,000 units, probably more if I could check or E2-modify the settings), the actual laser, and a remove stool gun (For taking care of contraptions as well).
He also has a few features, one of which is his orbital attack pattern and the other of which is his smoke thrusters. When booted up, typically on spawn, Zeus shoots up into the sky, until his top ranger outputs 5 units, and then maintains that altitude. This typically means he sticks around at the top of the map, but as he moves around he lowers and raises to keep the laser in range of the ground beneath. Other than, he only moves on the X and Y axises, to get directly above his target. The only time Zeus should ever be near the ground after creation is when he's crashing down towards it due to fatal damage (Which, sadly, means he's pretty antisocial).
The smoke thrusters produce zero thrust, so they have no ability to move Zeus around, but the smoke they produce whirls around from the motor they're attached to, creating a kind of stormcloud effect and obscuring Zeus from sight (Not that you could really see him from ground level on most maps). His laser only fires for an instant, like a lightning bolt, though the smoke remains for a couple extra seconds to reduce the odds of him being spotted moving away.
I've also considered giving him a pair of satellite dishes, though I'm not sure if I can wire those into an E2 appropriately for him to function as a satellite data relay station.
Current Body Iteration: Version 1.0
Current known code:[highlight=E2]@name Zeus operating system
@inputs Ceiling, LasDist:wirelink
@inputs Vec1:wirelink, Vec2:wirelink, Vec3:wirelink
@inputs Trans1, Trans2, Mot1a:wirelink, Mot1b:wirelink, Mot2a:wirelink, Mot2b:wirelink
@outputs BotNum, LastMes:string, GPS:vector
@outputs Smoke
@persist BotNum, Dir, Status:array, Quo:array
@persist HoverAlt, VecBase:vector, Orient:vector, Vec1mod:vector, Vec2mod:vector, Vec3mod:vector
@persist DoVec UpVec Target FireOn GPS AltMaker
#STARTUP
if(first()|dupe()){
timer("ghost_fill",1000)
#Drone ID generating
gSetGroup("Zeus")
BotNum = BotCount + 1
gSetNum(1,BotNum)
#Default parameters
Motion = 1
AltMaker = 1
Avoidance = 1
HazAvoid = 1
Phys = 1
VecBase = entity()os()
UpVec = vec(0,0,1)
DoVec = vec(0,0,-1)}
Quo = entity():getConstraints()
Repo = 1
stoptimer("ghost_fill")}
interval(10)
DirCode = gGetStr(3)
Passcode = gGetStr(2)
GPS = entityos()
#PHYSICAL
if(Phys = 1){
runOnTick(1)
Status = entity():getConstraints()
if(CntB == Status:count() & Quo:entity(CntA) != Status:entity(CntB)){
Dmgd = 1
Inj = CntA}
else{
if(Quo:entity(CntA) == Status:entity(CntB)){
CntA = Cnta + 1
CntB = 0}
else{CntB = CntB + 1}}
#DAMAGE REPORT
if(Dmgd & ~Dmgd){
PassRec = 1
Vec1 = toString(BasVec:x())+"/"+toString(BasVec:y())+"/"+toString(BasVec:z())
Vec2 = toString(OriVec:x())+"/"+toString(OriVec:y())+"/"+toString(OriVec:z())
GPSCo = toString(GPS:x)+"+"+toString(GPS:y)+"+"+toString(G PS:z)
InjMes = toString(Passcode)+" 1 "+toString(BotNum)+" "+GPS:toString()+" "+toString(Inj)+" "+Vec1+" "+Vec2
print(InjMes)}}
#COMMUNICATION RECEPTION
runOnChat(1)
Message = lastSaid()
if(Message:left(5) == Passcode & $Message){
ExMes = S:explode(" ",Message)
Code = ExMes:remove(1)
if(Code(1) == DirCode & Code(2) == 1|Code(1) == DirCode & Code(2) == 10){
Dir = Code(3)
if(Dir == 8 & Code(4):toNumber == BotNum){
FolTarg = Code(5)
else{Dir = Dir + -$Dir}
DirRec = 1}
#Recalculating the Passcode
if(PassRec){
NewCode = "!"+toString(Rand1)+toString(Rand2)+toString(Rand3 )+toString(Rand4)
gSetStr(2, NewCode)
PassRec = 0}
#Recalculating the Director code
if(DirRec){
NewDir = "!"+toString(Rand1)+toString(Rand2)+toString(Rand3 )
gSetStr(3,NewDir)
DirRec = 0}
#MOTION CONTROL
#POSITIONAL RESET
if(Repo){
Trans1Targ = Locator
Trans2Targ = Locator
FireOn = 0
Motion = 1
AltMaker = 1
Repo = 0}
#INTER-DRONE AVOIDANCE
if(Avoidance){
interval(500)
findClearBlackList()
findClearWhiteList()
findInSphere(entity()os(),400)
findClipToClass("gmod_wire_locator")
findSortByDistance(entity()os())
DroneDist = findResult(1)os():distance(findResult(2)
os())
if(DroneDist < 100){
VecBase = -(findResult(2)os())}}
#VECTOR TRIAD
if(Motion){
interval(500)
if(!Vec1|!Vec2|!Vec3){
interval(10)
if(Vec1){
Vec1mod = entity():isWeldedTo():massCenter() - Vec1os()
if(Vec2){Vec2mod = Vec1os() - Vec2
os()}
elseif(Vec3){Vec3mod = Vec1os() - Vec2
os()}}}
Vec1:setVector("Vector") = (VecBase + Vec1mod) + Vec1os()
Vec2:setVector("Vector") = (Vec1os() + Vec2mod) + Vec2
os()
Vec3:setVector("Vector") = (Vec1os() + Vec3mod) + Vec3
os()
#ALTITUDE CONTROL
if(AltMaker){
interval(500)
if(Ceiling < 5 | LasDist:number("Dist") > 9280){VecBase = entity()os() + DoVec}
elseif(LasDist:number("Dist") < 9280){VecBase = entity()os() + UpVec}}
#FIRING SEQUENCE
if(FireOn){
if(Target:isAlive){
TransAlp = 0
interval(50)
VecBase = Targetos():setZ(GPS:z)
if(GPS:distance(Targetos():setZ(GPS:z)) < 10|LasDist:number("EntID") = Target:id){
Smoke = 1
Laser:setNumber("On") = 1
if(Target:class != "Player"&Target:class != "NPC"){Remover:setNumber("") = 1)}
if(Laser:number("On") = 1)
interval(25)
Laser:setNumber("On") = 0
if(Remover:number("") = 1){Remover:setNumber("") = 0)}
soundPlay(1,7,"npc/sniper/echo1.wav")}
if(!Target & ~Target){
Smoke = 0
Trans Alp = 255}
FireOn = 0}}
#DIRECTOR ACTIONS
#ACTION ALLOCATION
if(Dir == 1|Dir == 13 & NoSix == 1){Ramble = 1}
else{Ramble = 0}
elseif(Dir == 2|Dir == 13 & NoSix == 2){Spawn = 1}
else{Spawn = 0}
elseif(Dir == 3|Dir == 13 & NoSix == 3){DefSelf = 1}
else{DefSelf = 0}
elseif(Dir == 4|Dir == 13 & NoSix == 4){DefDir = 1}
else{DefDir = 0}
elseif(Dir == 5|Dir == 13 & NoSix == 5){Attack = 1}
else{Attack = 0}
elseif(Dir == 8|Dir == 13 & NoSix == 8){Follow = 1}
else{Follow = 0}
elseif(Dir == 9|Dir == 13 & NoSix == 9){Stop = 1}
else{Stop = 0}
elseif(Dir == 13){Nsix = 1}
else{Nsix = 0}}}
else(Nsix = 1)
if(!FireOn){
#D08 - Follow protocol
if(Follow){
if(Targ:id() != FolTarg){
findInSphere(LasDist:vector("Pos"),1000)
interval(10)
if(FolTarg == Check:id()){
Targ = Check
elseif(TaMark == findToArray():count())
TaMark = 0
findInSphere(entity()os(),1000)}
else{
Check = findResult(TaMark)
TaMark += 1}}
TargDist = GPS:distance(Targos())
if(TargDist > 100){
VecBase = Targos()}}
#D09 - Stop protocol
if(Stop){
Motion = 0
AltMaker = 0
timer("bystander",10)
FireOn = 0
Dmgd = 0}
else{
Motion = 1
AltMaker = 1
Repo = 1}
#D13 - Number Six protocol
if(first()){
Pref = array()
if(R:count(Pref) < 12){
interval(50)
NewPoi = (R:count(Pref) + 1)
Pref:setNumber(NewPoi,NewPoi)}}
if(Nsix){
#I am not a number, I am a FREE MAN!
interval(60000)
N6Index = round(random(1,R:count(Pref)))
NoSix = Pref:number(N6Index)
NewPoi = N6Index + 1
NewEnt = round(random(1,[X]))
Pref:setNumber(NewEnt,NewPoi)}[/highlight]
Global variable group: Zeus
Global variables: BotCount, Passcode, DirCode
Last edited by Lyinginbedmon; 05-28-2009 at 02:59 PM. Reason: Added current OS
You have a hell lot of ideas and they're all pretty good ^^
Nice work, I look forward to see this completed.
First piece of code, the highly necessary altitude stabilisation code.[highlight=E2]if(first()|dupe()){
UpVec = vec(0,0,1)
DoVec = vec(0,0,-1)}
if(AltMaker){
interval(500)
if(Ceiling < 5){VecBase = entity()os() + DoVec}
if(LasDist > 10000){VecBase = entity()os() + DoVec}
elseif(LasDist < 9995){VecBase = entity()os() + UpVec}}[/highlight]I've had some experimental props run away from me skywards in gm_construct, and after chasing them for recapture I can certainly say that something as small and high up as Zeus is going to be effectively invisible to players unless they're close enough to already be deceased.
And now a stab at getting the following stormcloud and lightning bolt to work[highlight=E2]@inputs Smoke1:wirelink Smoke2:wirelink Smoke3:wirelink Smoke4:wirelink Cloud:wirelink
@inputs Laser:wirelink Remover:wirelink
if(Target:isAlive){
interval(50)
VecBase = Targetos():setZ(GPS:z)
if(GPS:distance(Targetos():setZ(GPS:z)) < 15|LasEnt:id = Target:id){
Smoke1:setNumber("A",8000)
Smoke2:setNumber("A",8000)
Smoke3:setNumber("A",8000)
Smoke4:setNumber("A",8000)
CloudYaw = 800
Laser:setNumber("On") = 1
if(Target:class != "Player"&Target:class != "NPC"){Remover:setNumber("") = 1)}
if(Laser:number("On") = 1)
interval(50)
Laser:setNumber("On") = 0
if(Remover:number("") = 1){Remover:setNumber("") = 0)}
soundPlay(1,7,"npc/sniper/echo1.wav")}
if(!Target & ~Target){
Smoke1:setNumber("A",0)
Smoke2:setNumber("A",0)
Smoke3:setNumber("A",0)
Smoke4:setNumber("A",0)
CloudYaw = -800}[/highlight]My first effort with the soundPlayback functions, so I've probably messed that up. Don't know off-hand what the On command of the Stool turret is.
Last edited by Lyinginbedmon; 04-27-2009 at 02:43 PM.
I've been neglecting Zeus quite appallingly, though he's considerably less complicated than Ares. I'm going to give him a target input code later tonight I think, so drones can tell him targets to shoot at, and his own auto-targetting for people that fire at him.
Which brings up another question. I'm pretty sure that a gravity gun-launched LUA cinderblock can't reach the elevations he generally stays at, and you need really good aim to hit him with the Remover gun, but do RPG missiles have a large enough range to reach him?
Perhaps I should have his defenses against the three reflect his actual altitude, so he only starts reacting to cinderblocks at lower altitudes where they can actually hit him. Or I could just have him shoot at missiles and cinderblocks all the time, as well as the players that launch them and point at him with the Remover gun (Though that may be slightly too specific for the E:weapon functions).
The Olympus Technologies drones, totally not SkyNet in Gmod form.
Cronus: The Ultimate Drone, definitely SkyNet in Gmod form.
The gBrain Project, the drone controls system that thinks it's better than you
Getting Zeus to accept an input target was fairly easy, the only adjustment I really need to make is to shift the firing sequence into a subroutine and have this code fire it when it reaches the position.[highlight=E2]if(~Trans1 & Trans1 == DirCode & Trans4 != DirCode|~Trans4 & Trans4 == DirCode & Trans1 != DirCode){
Out1 = 1
VecBase = vec(Trans2,Trans3,Alt)}[/highlight]What this code does is monitor the transferrers to see if the A input is the Director code (Which all drones and the Director know), and if only one of the transferrers is getting the right code then it changes VecBase to correspond to the other inputs as a vector co-ordinate. I'd rather wirelink to the transferrers so this'll probably change a little soon to incorporate an interval checking method.
Last edited by Lyinginbedmon; 05-08-2009 at 04:27 AM.
Construction on Zeus is now almost entirely complete. He's gone through a slight redesign following research into the smoke thrusters that determined rotation provides no additional benefit beyond simply having a few more of them.
So here's the latest model, you can see I've also relocated the data transferrers to the cap section which is easier to build on.
And here's Zeus from underneath with his new cloud generator system on. At altitude (The magic number for which is 9983, thanks to Josef for his handy expression that got me that number) he's a fairly noticeable black spot, but with this on he becomes almost entirely imperceptible from players at ground level.
I may want to have the data transferrers point at the Locator (House within the tube section) during seeking and firing however, they're seriously noticeable otherwise.
The Olympus Technologies drones, totally not SkyNet in Gmod form.
Cronus: The Ultimate Drone, definitely SkyNet in Gmod form.
The gBrain Project, the drone controls system that thinks it's better than you
Awesome job on the zeus droneI can't wait to see all of these done
Just curious, but why is 9983 the magic number?
gonna take a guess and say it is 5 less then the skybox.
It's about 50 units shy of the top of the map, as far as I read Josef's code. It's necessary to gauge the altitude for the vector thrusters to aim at, as a standard height from the ground.
The Olympus Technologies drones, totally not SkyNet in Gmod form.
Cronus: The Ultimate Drone, definitely SkyNet in Gmod form.
The gBrain Project, the drone controls system that thinks it's better than you
Bookmarks