• Divran's E2 Thread
    971 replies, posted
  • Avatar of Calamity
  • I'm sorry if it was given before, just cant read the whole thread. Can somebody give me a simple mech code?
  • Avatar of Leestons
  • [QUOTE=Calamity;35051420]I'm sorry if it was given before, just cant read the whole thread. Can somebody give me a simple mech code?[/QUOTE] [url]http://www.facepunch.com/threads/834005[/url]
  • Hi. If Divran is still online id like him to look at this [url]http://www.youtube.com/watch?v=pMHxGWx7Rgs[/url]. I did not make that VTOL but id like to make one using that E2. I would like that E2 to be the VTOL function of my aircraft. My aircraft would then have the abillity to turn on 2 giant jets at the back and make the VTOL controllers turn backwards to give forward thrust. What i do not know is how that E2 works and i cannot figure it out. I am also unable to figure out how to wire the thing. xXxENTExXx says in his video description on youtube that he will make a tutorial on how to make it if enough people watches it. But not many people have seen it so i doubt he will in the nearer future. I therefore ask if you could make/optimize his E2 code into what i described above and make it understandable to wire for a programming noob like me. I know there are some tutorials out there but i find none of them helping me with my VTOL. Please help someone.
  • I don't know if you already have one like this.. I don't want to go through the pages before this post but can you make an E2 where it spawns a sort of Jet that flies with Pitch and Roll like an actual real life Jet?
  • [QUOTE=unrezt;35398803]There is an OK flight chip posted by divran in this thread, find it yourself.[/QUOTE] Oh, I seem to forgot to put in "Spawn 3D Hologram" into that. When I try to rotate it using toWorld angles it starts spazzing out. When I use local Roll, it turns like it's Yaw and starts screwing up in flight -_- EDIT: I finally fixed it.. now I need an E2 that uses a Holo Missile and follows an entity (Another holo) all of my attempts have the missiles spazzing out, going the wrong way or going in circles .____. EDIT 2: To Elaborate on the above, basically a homing missile using a 3D hologram, it's for a holo-fight game that i'm trying to make with my friends, i'll be happy if you guys/Divran make a code that lets a hologram home in on an entity using holoAng and holoPos (since it's the only way to move holograms)
  • Avatar of Balto-the-Wolf-
  • [QUOTE=ryanhaych1;35698933]Can someone Make this [url]http://www.youtube.com/watch?v=cq5wMLqueBI[/url][/QUOTE] Should be a relatively simple matter of pushing an object along a parabola. Y=X[sup]2[/sup]*Curve alt-to-distance mult where Y is the Z of the missile and X is the distance between the launch point and a midpoint between the launchpoint and target. I might look into doing it eventually. If that equation fails, I worked out a simpler method earlier that is less clean.
  • I simply need a question answering if that's cool. Divran, I am making a map radar / hologram recreation in miniature. For part of this I am getting the players and creating hologram versions of them using holoModelAny. The problem is; I am trying to scale these holograms (models come from ragdolls) but it will not let me. Is it not possible to change the scale of a hologram if the model is taken from a ragdoll? Is there any way around this? Look forward to a reply. Cheers
  • Ive been playing garrysmod for over a year now. Ive gotten used to expression 2 for wiremod but im confused on a setup im trying to make for the wire wheels. Im trying to make the wheels drive in two modes. One as low speed and one as high with a reverse key. This is what i have so far.* @name 4x4 wheel drive system @imputs 8D 9D 5R---(D is for drive R is for reverse) @outputs W1 W2 W3 W4---(W is for wheel) If (8D==1) {W1=1 W2=1 W3=1 W4=1} else{W1=0 W2=0 W3=0 W4=0} if (9D==1) {W1=1*2 W2=1*2 W3=1*2 W4=1*2} else {W1=0 W2=0 W3=0 W4=0} if (5R==1) {W1=-1 W2=-1 W3=-1 W4=-1} else{W1=0 W2=0 W3=0 W4=0} Thats all i got for now. Im not sure if it will work. But if you know what to do or fix my expression. That would be helpfull. Also, i want to figure out a way to make an E2 chip for suspension and steering. I have a cheap steering E2 but i want to get others. Thankyou very much
  • Can someone make (or find) an E2 for an auto open fading door? (I've looked for it and can't find it) Thanks
  • Has anyone ever considered making easy yet interesting stuff, say, an engine kept spinning by Wire Weights O.o?
  • Can you make a E2 that its like blackjack where i can type hit or stay in chat and the number increse and make it so min bet is 500 and max is 5000 and then at the bottom make it so it says the person that bet and gave me money
  • i know this is an old thread but i was wondering if you had a e2 code for an airplane. the adv pod controller and trusters arent cutting it and i need to get the plane working soon because i want to make a dogfight server thanks
  • Avatar of DementedKilla
  • [QUOTE=Knas;35431856][B]Can someone make an flight E2 for planes? [/B][/QUOTE] Provided you have a flyable plane that you created, and FinTool: [CODE]@name Plane @inputs W A S D Shift Up Down Active MoreP LessP @outputs Left Right Back Thruster Trim Power Left=52.3 Right=52.3 Back=97+Trim Thruster=0+Power if(Active==0){Trim=0} if(Active==0){Power=0} if(Up){Trim+=1} if(Down){Trim-=1} if(MoreP){Power+=100} if(LessP){Power-=100} if(Trim>10){Trim=10} if(Trim<-10){Trim=-10} if(Power>1000){Power=1000} if(Power<-0){Power=0} if(W){Back=117+Trim} if(S){Back=77+Trim} if(A){Left=42,Right=62} if(D){Left=62,Right=42} if(Shift){Thruster=850+Power}[/CODE] Just change the settings according to your hydraulics length and thruster. Look on youtube for tutorials on FinTool and planes.
  • Avatar of DementedKilla
  • [QUOTE=Tjdagamer;36784340]Ive been playing garrysmod for over a year now. Ive gotten used to expression 2 for wiremod but im confused on a setup im trying to make for the wire wheels. Im trying to make the wheels drive in two modes. One as low speed and one as high with a reverse key. This is what i have so far.* @name 4x4 wheel drive system @imputs 8D 9D 5R---(D is for drive R is for reverse) @outputs W1 W2 W3 W4---(W is for wheel) If (8D==1) {W1=1 W2=1 W3=1 W4=1} else{W1=0 W2=0 W3=0 W4=0} if (9D==1) {W1=1*2 W2=1*2 W3=1*2 W4=1*2} else {W1=0 W2=0 W3=0 W4=0} if (5R==1) {W1=-1 W2=-1 W3=-1 W4=-1} else{W1=0 W2=0 W3=0 W4=0} Thats all i got for now. Im not sure if it will work. But if you know what to do or fix my expression. That would be helpfull. Also, i want to figure out a way to make an E2 chip for suspension and steering. I have a cheap steering E2 but i want to get others. Thankyou very much[/QUOTE] I am Not a coder, I just take what I have and reconfigure it till it works. I have looked at what you have and what you're asking and came up with this(I don't know if this is what you're asking for, but..) [CODE]@name 4x4 Wheel Drive System @inputs W S Active Drive1 Drive2 @outputs Go SpeedMod Go=0 if(Active==0){SpeedMod=0} if(Drive1){SpeedMod=0} if(Drive2){SpeedMod=100} if(W){Go=1} if(S){Go=-1}[/CODE] So you would just wire all the Tires:Go to the chip Go, and all Tires:SpeedMod to the chips Speedmod. Wiring from the chip to an Advanced Pod Controller is a no brainer. You can also use a screen to display what drive you're in by wiring to the chips Speedmod, or you can just peek at the tires. Other than that, Wire wheels suck, they kept going into the ground on me with the speed mod up. OH and, if you want to drive in low speed, just set the wheel torque to something lower and using the SpeedMod will double it when in Drive2.
  • can some one help me fix this old peace of crap and im looking for an E2 that puts a insta kill turret right over head as and a holo gyroscope and not to fancy angle like wings that i can flap by pressing any button i have it set up 2 sorry if i am asking for much [QUOTE]@name E2 kill @inputs @outputs @persist Pos:vector Player:entity A:vector @trigger runOnTick(1) runOnChat(1) entity():setMass(9) Speach = owner(:lastSaid(" ") if(Speach:string()=="/kill" & changed(Speach:string(2))){ Temp = findPlayerByName(Speach:string(0)) if(Temp:isPlayer){ Player = T9 hint(array("0) A = vec(0,0,0) } } if(Speach:string(1) == )){ hideChat(1) hint("The E2 is now above your head",7) Player = owner() A = vec(0,0,100) } Pos = (Player:pos) - entity():pos() + Player:boxCenter() + A)*10 applyForce((Pos + $Pos*5)*mass()[/QUOTE] and this one [QUOTE]@name Flatgrass Colours @inputs @outputs RGY:vect @persist RGY:vector Nigga:ent @trigger runOnTick(0) for (I = 1,entity():getCon():count()) { Nigga = entity():get()[I,entity] Nigga:setColor(000) Nigga:setMaterial("models/debug/debug") } Time = realtime()/1 TimeFloored = floor(realtime()/1) Transition = (Time - TimeFloored)*7 + 1 if (Transition 200) { RGY = vec(05 - Transition,Transition,0) } elseif (Transition 511) { RGY = vec(0,010 - Transition,Transition - 255) } else { RGY = vec(Transition - 510,0,765 - Transition) } entity():setColor(RGB) entity():("nature/grassfloor002a")[/QUOTE]
  • So i have been hard at work on this VTOL, and i need a cool mouse aimed turret, rocket pods or plasma cannon or something similar, i have no idea how to use E2 so halp meh?
  • [QUOTE=lolguy45545;41517527]So i have been hard at work on this VTOL, and i need a cool mouse aimed turret, rocket pods or plasma cannon or something similar, i have no idea how to use E2 so halp meh?[/QUOTE] ent:SetAng((ent:pos() - target:pos()):toAngle())
  • Hi peeps, im working on a holo E2, im a beginner with E2. i was wondering how i could make a holo hit the ground instead of going trough the ground. and how i could make a sphere roll over the ground for example. thnx
  • [QUOTE=Noi;41518802]ent:SetAng((ent:pos() - target:pos()):toAngle())[/QUOTE] Thanks Noi, i actually got how to use it :P
  • Avatar of ROFLBURGER
  • praise the lord an e2 thread I'm working on a player map. There are plenty out there, but I just want to make my own, you know? I'm just having some issues with my holograms [code]@name Player Map @inputs @outputs Plrs:array @persist A @trigger interval(10) Plrs=players() Scale = 100 A=min(A+1,Plrs:count()) TR = Plrs[A,entity] EP = entity():pos() #(-(entity():pos()-Ent:pos())/Scale)+entity():pos()+vec(0,0,0) Pos=(-(EP-TR:pos())/Scale)+EP Pitch=TR:angles():pitch() Yaw=TR:angles():yaw() Roll=TR:angles():roll() X=TR:pos():x() Y=TR:pos():y() Z=TR:pos():z() holoCreate(A) holoPos(A,Pos+vec(0,0,2.5)) holoModel(A,"cube") holoScaleUnits(A,vec(2,2,5)) holoAng(A,TR:angles()) holoCreate(A+1000) holoPos(A+1000,Pos+TR:forward()*2+(TR:up()*4)) holoModel(A+1000,"cone") holoScaleUnits(A+1000,vec(5,5,5)) holoColor(A+1000,vec(255,255,0),100) holoAng(A+1000,TR:angles()+ang(-90,0,0)) if(A>=Plrs:count()) {A=0} holoCreate(100) holoPos(100,entity():pos()) holoScaleUnits(100,vec(-575,-575,-575)) holoColor(100,vec(0,0,200)) holoCreate(102) #(-(entity():pos()-Ent:pos())/Scale)+entity():pos()+vec(0,0,0) holoPos(102, (-(EP-owner():pos())/Scale)+EP+vec(0,0,5)) holoScaleUnits(102,vec(1,1,5)) holoColor(102,vec(255,0,0)) holoAng(102,ang(180,0,0)) holoModel(102,"cone") holoCreate(103) holoPos(103,entity():pos()) holoScaleUnits(103,vec(575,575,0.01)) holoColor(103,vec(0,100,0)) [/code] What I am trying to do is make holocreate(A+1000) act as a line of sight for the player, but it ends up all wonky when I try it. Does anyone know how to do that?
  • Avatar of Pandaman09
  • [QUOTE=ROFLBURGER;41533458]praise the lord an e2 thread I'm working on a player map. There are plenty out there, but I just want to make my own, you know? I'm just having some issues with my holograms What I am trying to do is make holocreate(A+1000) act as a line of sight for the player, but it ends up all wonky when I try it. Does anyone know how to do that?[/QUOTE] You should be using a for loop [code]for(I=1,players():count()){ holocreate(I+1000) }[/code] etc [editline]20th July 2013[/editline] also I guess this thread is being revived lolol
  • Avatar of ROFLBURGER
  • [QUOTE=Pandaman09;41535474]You should be using a for loop [code]for(I=1,players():count()){ holocreate(I+1000) }[/code] etc [editline]20th July 2013[/editline] also I guess this thread is being revived lolol[/QUOTE] Shit I didn't even know there was a for loop in e2.
  • Could someone take this auto turret e2 and make it to where instead of having to "/t name" to target one person it just targets everyone but the owner please. [CODE]@name e2 AutoTurret By FPS Earworm @outputs Fire @persist Turret:entity Hover_height Vec:vector Ang:angle On Player:entity runOnTick(1) if(first()){ findByClass("gmod_wire_turret") findSortByDistance(entity():pos()) Turret = find() } if(!Turret){ print("Please Spawn A Wire Turret First") } if(owner():lastSaid()=="/on") {On = 1} if(owner():lastSaid()=="/off") {On = 0} Vec = entity():pos() - Turret:pos() + vec(0,0,50) Turret:applyForce((Vec + $Vec*5)*Turret:mass()*5) rangerFilter(Turret) Ranger = rangerOffset(100000, Turret:pos(), Turret:forward()) if(On==1){ if(Ranger:entity()==Player){ Fire=1 }else{ Fire = 0 } }else{ Fire = 0 } P = Turret:elevation( Player:pos() + Player:boxCenter() ) Y = Turret:bearing( Player:pos() + Player:boxCenter() ) R = Turret:angles():roll() Ang = -ang(P,Y,R)/15 Turret:applyAngForce((Ang + $Ang*5)*Turret:mass()*15) S = owner():lastSaid():explode(" ") if(S:string(1)=="/t"){ TempPlayer = findPlayerByName(S:string(2)) if(TempPlayer:isPlayer()){ Player = TempPlayer } } if ( first()) { hint("Commands Are:",45) hint("/t [NAME OF TARGET HERE]",45) hint("/on [TURN TURRET ON]",45) hint("/off [TURNS TURRET OFF]",45) hint("By FPS Earworm",45) hint("DO NOT REUPLOAD",45) } [/CODE] Thank you!