• Divran's E2 Thread
    971 replies, posted
  • Avatar of Divran
  • [b]Remake[/b] My old E2 thread called "I'll make E2s for you guys!" was removed (Due to some sort of bug. Wasn't a moderator), so I decided to make a new one. [b]A minute for lost E2s[/b] Let's all take a minute for all the [I]8 pages[/I] full of awesome E2s that were lost with the old thread (Ahem.. or not xD) [b]Ask for E2s[/b] Basically, ask for an E2 and I'll try to make it, as long as it isn't too hard. Remember, I'm only one guy. I can't make too complicated stuff, and I can't make E2s for 5 people at once. [b]Your own E2s[/b] You're welcome to help me help other people by posting your own creations using ideas from this thread. If you do, be prepared that I might optimize it and/or give positive feedback. If you for some reason don't like this, then don't post your E2s. [b]Thanks[/b] Thanks to everyone who helped me in the old thread, and prevented it from turning into another flame war. Keep up the good job in this new thread! Allright, let's go!
  • Avatar of Carlisle
  • I wonder why the old thread was vaporized. if you want, I can post some of the E2's I got out of the old thread
  • Avatar of Divran
  • [QUOTE=Carlisle;17819113]I wonder why the old thread was vaporized. if you want, I can post some of the E2's I got out of the old thread[/QUOTE] Yeah do that.
  • Avatar of Balto-the-Wolf-
  • Hey Ill post as many as I got from the thread (all that intrested me) (that was an amazing thread *takes off hat and bows*) ------------And can you make an E2 that will act as a gyroscope? (dampen pitch, yaw, and roll)------------------------- Now for the lost codes (I know this is long but here you go, sorry). Here is the applyforce hoverer Dirivan mande for me: [code]@name Hoverer..er @persist E:entity Dist:vector HoverHeight if (first()|duped()) { #Change the hover height here. Or make yourself an input for it. HoverHeight = 100 E = entity():isWeldedTo() runOnTick(1) } #Rangerfilter the prop rangerFilter(E) #Get ranger data Ranger = rangerOffset(E:massCenter(),E:massCenter()-HoverHeight+1) #If the ranger hit.. if (Ranger:hit()) { #Get the distance force Dist = vec(0,0,HoverHeight-Ranger:distance()) #Apply the force E:applyForce((Dist*10-E:vel())*E:mass()*vec(0,0,1)) #If you remove * vec(0,0,1) it will prevent left/right/forward/back movement. } #Bonus! NOTE: ADVANCED! I suggest you ignore this if you don't understand it.. #Uncomment below for some applyTorque quaterniton stabilization :P #You will probably have to change the multipliers first. #Mul1 = 50 #Mul2 = 2 #Torque = E:toLocal(rotationVector((quat(ang(0,0,0))/quat(E)))+E:massCenter()) #E:applyTorque((Torque*Mul1-E:angVelVector()*Mul2)*E:inertia()*!E:isPlayerHolding())[/code] Now for an E2 that makes props circle your head than launch at your crosshair on secondary fire: [code]@name Prop Circle @persist Ent1:entity Ent2:entity Ent3:entity Ent4:entity Ent5:entity Ent6:entity @persist Pos1:vector Pos2:vector Pos3:vector Pos4:vector Pos5:vector Pos6:vector @persist Mode:string Nr C M DontSearch K @trigger all # Hello! This expression was made by Divran. # Controls: # Mouse2 to shoot the prop. Sorry, it's not 100% accurate. :( # Crouch + Mouse2 to manually rescan ALL the props (Drops them all then rescans) # Walk up to a prop to automatically pick it up. # It only targets and only works on your own props. # Have fun! #Don't change anything below here. runOnTick(1) #Auto Rescan if (clk("Rescan")) { findClearBlackList() findClearWhiteList() findIncludePlayerProps(owner()) findExcludeEntity(Ent1), findExcludeEntity(Ent2), findExcludeEntity(Ent3), findExcludeEntity(Ent4), findExcludeEntity(Ent5), findExcludeEntity(Ent6) findByClass("prop_physics") findSortByDistance(owner():shootPos()) if (find():massCenter():distance(owner():shootPos()) < 500) { if (Nr == 0) { if (find() != noentity()) {Nr = 1,Ent1 = find()} } elseif (Nr == 1) { if (find() != noentity()) {Nr = 2,Ent2 = find()} } elseif (Nr == 2) { if (find() != noentity()) {Nr = 3,Ent3 = find()} } elseif (Nr == 3) { if (find() != noentity()) {Nr = 4,Ent4 = find()} } elseif (Nr == 4) { if (find() != noentity()) {Nr = 5,Ent5 = find()} } elseif (Nr == 5) { if (find() != noentity()) {Nr = 6,Ent6 = find()} } } } #Auto rescan timer if (Nr != 6 & !DontSearch) {timer("Rescan",500)} #Crouch + Mouse2 rescanning all props K = owner():isCrouch() if (K & $M == 1) {Ent1 = Ent2 = Ent3 = Ent4 = Ent5 = noentity(), timer("Rescan",1)} if (clk("Search")) {DontSearch = 0} #How many do we have? Nr = (Ent1:model()!="")+(Ent2:model()!="")+(Ent3:model()!="")+(Ent4:model()!="")+(Ent5:model()!="")+(Ent6:model()!="") #Shooting M = owner():keyAttack2() if ($M == 1) { if (Nr == 6) { Pos6 = (owner():aimPos()-Ent6:massCenter())* Ent6:inertia():length()^1.5 Ent6:applyForce(Pos6+$Pos6*5) Ent6 = noentity() } elseif (Nr == 5) { Pos5 = (owner():aimPos()-Ent5:massCenter())* Ent5:inertia():length()^1.5 Ent5:applyForce(Pos5+$Pos5*5) Ent5 = noentity() } elseif (Nr == 4) { Pos4 = (owner():aimPos()-Ent4:massCenter())* Ent4:inertia():length()^1.5 Ent4:applyForce(Pos4+$Pos4*5) Ent4 = noentity() } elseif (Nr == 3) { Pos3 = (owner():aimPos()-Ent3:massCenter())* Ent3:inertia():length()^1.5 Ent3:applyForce(Pos3+$Pos3*5) Ent3 = noentity() } elseif (Nr == 2) { Pos2 = (owner():aimPos()-Ent2:massCenter())* Ent2:inertia():length()^1.5 Ent2:applyForce(Pos2+$Pos2*5) Ent2 = noentity() } elseif (Nr == 1) { Pos1 = (owner():aimPos()-Ent1:massCenter())* Ent1:inertia():length()^1.5 Ent1:applyForce(Pos1+$Pos1*5) Ent1 = noentity() } #Stop searching for new props for a while, otherwise it will catch the prop in midair as you shoot it. DontSearch = 1 timer("Search",2000) } else { #Flying if (Ent1 != noentity()) { C = 0 Circle1 = vec(0,100+Nr*20,0):rotate(ang(0,100*curtime(),0)+ang(0,C,0)) Pos1 = (owner():pos()+vec(0,0,120)+Circle1-Ent1:massCenter())* Ent1:inertia():length()^1.5 Ent1:applyForce(Pos1+$Pos1*5) } if (Ent2 != noentity()) { if (Nr == 2) {C = 180} elseif (Nr == 3) {C = 120} elseif (Nr == 4) {C = 90} elseif (Nr == 5) {C = 72} elseif (Nr == 6) {C = 60} Circle2 = vec(0,100+Nr*20,0):rotate(ang(0,100*curtime(),0)+ang(0,C,0)) Pos2 = (owner():pos()+vec(0,0,120)+Circle2-Ent2:massCenter())* Ent2:inertia():length()^1.5 Ent2:applyForce(Pos2+$Pos2*5) } if (Ent3 != noentity()) { if (Nr == 3) {C = -120} elseif (Nr == 4) {C = -90} elseif (Nr == 5) {C = -72} elseif (Nr == 6) {C = -60} Circle3 = vec(0,100+Nr*20,0):rotate(ang(0,100*curtime(),0)+ang(0,C,0)) Pos3 = (owner():pos()+vec(0,0,120)+Circle3-Ent3:massCenter())* Ent3:inertia():length()^1.5 Ent3:applyForce(Pos3+$Pos3*5) } if (Ent4 != noentity()) { if (Nr == 4) {C = 180} elseif (Nr == 5) {C = 144} elseif (Nr == 6) {C = 120} Circle4 = vec(0,100+Nr*20,0):rotate(ang(0,100*curtime(),0)+ang(0,C,0)) Pos4 = (owner():pos()+vec(0,0,120)+Circle4-Ent4:massCenter())* Ent4:inertia():length()^1.5 Ent4:applyForce(Pos4+$Pos4*5) } if (Ent5 != noentity()) { if (Nr == 5) {C = -144} elseif (Nr == 6) {C = -120} Circle5 = vec(0,100+Nr*20,0):rotate(ang(0,100*curtime(),0)+ang(0,C,0)) Pos5 = (owner():pos()+vec(0,0,120)+Circle5-Ent5:massCenter())* Ent5:inertia():length()^1.5 Ent5:applyForce(Pos5+$Pos5*5) } if (Ent6 != noentity()) { if (Nr == 6) {C = 180} Circle6 = vec(0,100+Nr*20,0):rotate(ang(0,100*curtime(),0)+ang(0,C,0)) Pos6 = (owner():pos()+vec(0,0,120)+Circle6-Ent6:massCenter())* Ent6:inertia():length()^1.5 Ent6:applyForce(Pos6+$Pos6*5) } }[/code] Now for a wieght measuring ranger: [code]@name Ranger Weight @outputs Weight interval(5000) #Doesn't need to update any faster, really. Weight = ranger(200):entity():mass() #Check for an entity 200 units in front of the E2. Change this distance if you want.[/code] And the advanced wieght measuring ranger: [code]@name Adv Ranger Weight @outputs Weight interval(5000) #Doesn't need to update any faster either. Ent = ranger(200):entity() #Check for an entity 200 units in front of the E2. Change this distance if you want. Props = Ent:getConstraints() #Gets all the props Props:pushEntity(Ent) #This was the fix. This adds the Ent to the array. Weight = 0 #Resets weight to 0 before calculating for(I=1,Props:count()) {Weight+=Props:entity(I):mass()} #Calculates the mass of all the props][/code] Now for one that makes props float above you and intercepts RPG's" [code]@name Auto Anti RPG - AAR @inputs Base:entity Prop:entity @outputs Mode:string Target:entity @persist Mode:string Pos:vector Ang:angle Target:entity Dist Nr DistDetect DistFly @trigger all runOnTick(1) if (Nr == 0) { #Nr: Nr = 1 #If you want to have multiplie AAR's change this Nr. If you have two AAR's, change the Nr of the first one to 1 and the second one to 2. DistDetect = 2000 #How far away it will scan DistFly = 1300 #Ho
  • Avatar of Divran
  • [QUOTE=Balto-the-Wolf-Dog;17826493]Hey Ill post as many as I got from the thread (all that intrested me) (that was an amazing thread *takes off hat and bows*) ------------And can you make an E2 that will act as a gyroscope? (dampen pitch, yaw, and roll)------------------------- Now for the lost codes (I know this is long but here you go, sorry). Here is the applyforce hoverer Dirivan mande for me: *codes* [/QUOTE] That's a lot. :D But just so you know, that Prop Circle E2 sucks. I've already made one that can use an unlimited amount of props. And to anyone who asks, I didn't make "MetadorForAll" Edit: [code]@name E2 Gyroscope @inputs Ent:entity OffsetPitch OffsetYaw OffsetRoll OffsetAngle:angle @outputs Pitch Yaw Roll Angle:angle PitchVel YawVel RollVel AngleVel:angle runOnTick(1) #If Ent is wired, use that, else use the E2 itself: En = (Ent ? Ent : entity()) #Set the offset (and prioratize the :angle input over numeric inputs): Offset = (OffsetAngle ? OffsetAngle : ang(OffsetPitch,OffsetYaw,OffsetRoll) ) #Get the angle: Angle = En:angles() + Offset #Get the angle velocity: AngleVel = En:angVel() #Numeric outputs: Pitch = Angle:pitch() Yaw = Angle:yaw() Roll = Angle:roll() PitchVel = AngleVel:pitch() YawVel = AngleVel:yaw() RollVel = AngleVel:roll()[/code]
  • Avatar of Balto-the-Wolf-
  • about how much dampening is there? I dont want keepupright just to be clear. (I havent tested yet).. Oh is there a way this could be turned on and off? I am using it in a VTOL to smooth touchy handling. I would prefer it only to be active during vertical flight (shit key) so that the plane maintains its manuverability in horizontal flight LOL I had a blast with the prop circle e2!!! If your telling me there is a better version then LOL
  • Avatar of Divran
  • [QUOTE=Balto-the-Wolf-Dog;17834337]about how much dampening is there? I dont want keepupright just to be clear. (I havent tested yet).. Oh is there a way this could be turned on and off? I am using it in a VTOL to smooth touchy handling. I would prefer it only to be active during vertical flight (shit key) so that the plane maintains its manuverability in horizontal flight LOL I had a blast with the prop circle e2!!! If your telling me there is a better version then LOL[/QUOTE] Dampening? I didn't put any dampening in there. It's just a gyroscope with some Offset inputs. What do you mean by "dampening"? Put "On" in inputs, after all the Offset inputs, and then put a giant "if (On) { ... }" around [I]all[/I] the code. Let me know if you don't get it. And yes. Ever heard of [url=http://www.wiremod.com/forum/contraptions-saves/12390-release-balls-steel.html]Balls of Steel?[/url] When I saw that E2, I tried to make my own. After several tries, I got it working. It works almost just like balls of steel, with some of my own additions. EDIT: Here's a really funny E2 I made that makes you say "HAX" whenever you use the crowbar: [code]@name Crowbar Hax interval(10) Atk = owner():keyAttack1() Wpn = owner():weapon():type() if (Atk & Wpn == "weapon_crowbar") { timer("Sound",700) if (clk("Sound") | changed(Atk)) { owner():soundPlay(1,0.7,"vo/npc/male01/hacks0"+randint(1,2)+".wav") soundPitch(1,165) } } else {soundStop(1)}[/code] And here is V2. It does the same thing, except works for everyone on the entire server at the same time. And it's just generally better than the other one. [code]@name Crowbar Hax for Everone @persist Ply:array PlyUse:array if (first()) { findByClass("player") Ply = findToArray() for(I=1,Ply:count()) {PlyUse[Ply:entity(I):id(),number] = 45, holoCreate(I),holoPos(I,Ply:entity(I):shootPos()),holoParent(I,Ply:entity(I)),holoAlpha(I,0)} } interval(10) for(I=1,Ply:count()) { En = Ply:entity(I) Atk = En:keyAttack1() Wpn = En:weapon():type() if (Atk & Wpn == "weapon_crowbar") { Nr = PlyUse[En:id(),number] PlyUse[En:id(),number] = Nr + 1 if (Nr>50) { PlyUse[En:id(),number] = 0 holoEntity(I):soundPlay(I,0.7,"vo/npc/male01/hacks0"+randint(1,2)+".wav") soundPitch(I,165) } } else {soundStop(I), PlyUse[En:id(),number] = 45} }[/code]
  • Avatar of jmazouri
  • Never posted this, but might as well. It's my old chatbot, some shit might not work anymore, but meh: [CODE]@name Jmazouri's Incredible chat Parser [JIP] v0.6 @inputs Link:wirelink @outputs Update @persist @trigger ################################################################################################# if (first()|duped()) { concmd("wait 150; say "+"[JIP] Has just been spawned! Find it on the map!") } timer("update",10000) if (clk("update")) { Update = 1 } else {Update = 0} if (first()) { holoCreate(550) holoCreate(551) holoCreate(552) holoCreate(553) holoCreate(554) holoCreate(555) holoCreate(556) holoPos(550,entity():pos()+vec(0,-20,50)) holoPos(551,entity():pos()+vec(0,-27,31)) holoPos(552,entity():pos()+vec(0,10,45)) holoPos(553,entity():pos()+vec(0,10,59)) holoPos(554,entity():pos()+vec(0,10,31)) holoPos(555,entity():pos()+vec(0,40,45)) holoPos(556,entity():pos()+vec(0,54.2,54.6)) holoScaleUnits(550,vec(1,10,30)) holoScaleUnits(551,vec(1,25,10)) holoScaleUnits(552,vec(1,10,20)) holoScaleUnits(553,vec(1,30,10)) holoScaleUnits(554,vec(1,30,10)) holoScaleUnits(555,vec(1,10,40)) holoScaleUnits(556,vec(1,20,20)) holoMaterial(550,"models/XQM/LightLinesGB") holoMaterial(551,"models/XQM/LightLinesGB") holoMaterial(552,"models/XQM/LightLinesGB") holoMaterial(553,"models/XQM/LightLinesGB") holoMaterial(554,"models/XQM/LightLinesGB") holoMaterial(555,"models/XQM/LightLinesGB") holoMaterial(556,"models/XQM/LightLinesGB") } #Link:writeString("[JIP] Command List, v0.6",3,2,900,0,1) #Link:writeString("OWNER ONLY COMMANDS",1,4,119,0,0) #Link:writeString("kill, playerinfo, entinfo,",1,6,900,0,0) #Link:writeString("music, musiclist, stopmusic,",1,8,900,0,0) #Link:writeString("musicvolume",1,10,900,0,0) #Link:writeString("GLOBAL COMMANDS (ANYONE)",1,12,191,0,0) #Link:writeString("8ball, givehp, comusage",1,14,900,0,0) ################################################################################################# runOnTick(1) runOnChat(1) RandomInteger1 = randint(1,3) RandomInteger2 = randint(1,19) JipTrig = owner():lastSaid():explode(" ") Var1 = JipTrig:string(1) Var2 = JipTrig:string(2) Var3 = JipTrig:string(3) Var4 = JipTrig:string(4) Var5 = JipTrig:string(5) Var6 = JipTrig:string(6) Var7 = JipTrig:string(7) Var8 = JipTrig:string(8) Var9 = JipTrig:string(9) Var10 = JipTrig:string(10) Var11 = JipTrig:string(11) Var12 = JipTrig:string(12) Var13 = JipTrig:string(13) Var14 = JipTrig:string(14) Var15 = JipTrig:string(15) Var16 = JipTrig:string(16) Var17 = JipTrig:string(17) Var18 = JipTrig:string(18) Var19 = JipTrig:string(19) Var20 = JipTrig:string(20) Player = findPlayerByName(Var3) ################################################################################################# if (chatClk(owner()) == 1) { ################################################################################################# if (Var1 == "jip") { ################################################################################################# # "kill" function if (Var2 == "kill") { Random = RandomInteger1 if (Random == 1) { Type = "maul" } elseif (Random == 2) { Type = "slay" } elseif (Random == 3) { Type = "sslay" } if (Random == 1| Random == 2| Random == 3) { concmd("ulx "+Type+" "+findPlayerByName(Var3):name()) } } ################################################################################################# # "findinfo" function if (Var2 == "entinfo") { PointEnt = owner():aimEntity() if (PointEnt) { if (PointEnt:isPlayer()) { hint("Use \"playerinfo\" for players!",10) } else { hint("Type: "+PointEnt:type(),10) hint("R: "+PointEnt:getColor():x():toString(),10) hint("G: "+PointEnt:getColor():y():toString(),10) hint("B: "+PointEnt:getColor():z():toString(),10) hint("Owned by: "+PointEnt:owner():name(),10) hint("Ent ID: "+PointEnt:id():toString(),10) hint("Model: "+PointEnt:model(),10) } } else {hint("You can't use this on the world, silly.",7)} } ################################################################################################# # "playerinfo" function if (Var2 == "playerinfo") { if (Var3 != "") { Player = findPlayerByName(Var3) if (Player) { if(Player:isAdmin()==1){IsAdmin="Yes"} else {IsAdmin="No"} if(Player:isSuperAdmin()==1){IsSuperAdmin="Yes"} else {IsSuperAdmin="No"} hint("Name: "+Player:name(),10) hint("SteamID: "+Player:steamID(),10) hint("EntID: "+Player:id():toString(),10) hint("Ping: "+Player:ping():toString(),10) hint("Model: "+Player:model(),10) hint("Is an Admin?: "+IsAdmin,10) hint("Is a SuperAdmin?: "+IsSuperAdmin,10) } else {hint("Name was not found.",10)} } else {hint("That is not a Player! Use \"entinfo\"!",10)} } ################################################################################################# # "music" function if (Var2 == "music") { Ballsack = table() Ballsack:setString("stillalive","music/portal_still_alive.mp3") Ballsack:setString("4kdegreeskelvin","music/portal_4000_degrees_kelvin.mp3") Ballsack:setString("gamestartup1","ui/gamestartup1.mp3") Ballsack:setString("gamestartup2","ui/gamestartup2.mp3") Ballsack:setString("gamestartup3","ui/gamestartup3.mp3") Ballsack:setString("gamestartup4","ui/gamestartup4.mp3") Ballsack:setString("gamestartup5","ui/gamestartup5.mp3") Ballsack:setString("gamestartup6","ui/gamestartup6.mp3") Ballsack:setString("gamestartup7","ui/gamestartup7.mp3") Ballsack:setString("ravebreak","ravebreak.mp3") if (Var3 == "stillalive" | Var3 == "4kdegreeskelvin" | Var3 == "gamestartup1" | Var3 == "gamestartup2" | Var3 == "gamestartup3" | Var3 == "gamestartup4" | Var3 == "gamestartup5" | Var3 == "gamestartup6" | Var3 == "gamestartup7" | Var3 == "ravebreak") { owner():soundPlay(7331,0,Ballsack:string(Var3)) } else { hint("That song does not exist!",10)} } if (Var2 == "musiclist") { concmd("wait 150;say Current [JIP] Music List, v0.6") concmd("wait 300;say To use, say \"jip music (songindexhere)\"") concmd("wait 450;say stillalive, 4kdegreeskelvin, gamestartup1-7, ravebreak") } if (Var2 == "stopmusic") { soundStop(7331) } if (Var2 == "musicvolume") { soundVolume(7331,Var3:toNumber()) } ################################################################################################# #DO NOT REMOVE THESE TWO }s THEY ARE THE MOST IMPORTANT }s EVER } } ################################################################################################# ################################################################################################# ################################################################################################# #Begin serverwide functions JipTrigS = lastSaid():lower():explode(" ") Var1S = JipTrigS:string(1) Var2S = JipTrigS:string(2) Var3S = JipTrigS:string(3) Var4S = JipTrigS:string(4) Var5S = JipTrigS:string(5) Var6S = JipTrigS:string(6) Var7S = JipTrigS:string(7) Var8S = JipTrigS:string(8) Var9S = JipTrigS:string(9) Var10S = JipTrigS:string(10) Var11S = JipTrigS:string(11) Var12S = JipTrigS:string(12) Var13S = JipTrigS:string(13) Var14S = JipTrigS:string(14) Var15S = JipTrigS:string(15) Var16S = JipTrigS:string(16) Var17S = JipTrigS:string(17) Var18S = JipTrigS:string(18) Var19S = JipTrigS:string(19) Var20S = JipTrigS:string(20) ################################################################################################# if (chatClk() == 1) { JipLastSpokeS = lastSpoke() ################################################################################################# if (Var1S == "jip") { ############################################
  • Avatar of Balto-the-Wolf-
  • When I say dampening I am refering to making something resist pitching, rolling, and yawing. I want it to smooth the movements of my touchy vtol
  • Avatar of xxfalconxx
  • how about an E2 that warns someone not to touch something and if they touch it, it kills them with an applyforce ball and yells "I TOLD YA DON'T TOUCH THAT DARN THING." i'd make it, but i don't know applyforce.
  • Avatar of jonney934
  • Simple code for servers that let anyone enter your seats, I got it from someone but I don't remember who, I added a few things too but I have not tested this since a few major wiremod changes. [code] @name AHC @inputs Pod:wirelink @outputs @persist @trigger all interval(100) #Anti-Hijacker Code if(Pod:entity("Entity"):driver():steamID() != owner():steamID() & Pod:number("Active") >= 1) { Pod:printDriver("Terminated for trying to steal "+owner():name()+"'s vehicle.") print(Pod:entity("Entity"):driver():name()+" tried to steal your vehicle.") Pod:setNumber("Terminate", 1) } else { Pod:setNumber("Terminate", 0) } [/code]
  • Avatar of Divran
  • [QUOTE=jonney934;17851690]Simple code for servers that let anyone enter your seats, I got it from someone but I don't remember who, I added a few things too but I have not tested this since a few major wiremod changes. [code] @name AHC @inputs Pod:wirelink @outputs @persist @trigger all interval(100) #Anti-Hijacker Code if(Pod:entity("Entity"):driver():steamID() != owner():steamID() & Pod:number("Active") >= 1) { Pod:printDriver("Terminated for trying to steal "+owner():name()+"'s vehicle.") print(Pod:entity("Entity"):driver():name()+" tried to steal your vehicle.") Pod:setNumber("Terminate", 1) } else { Pod:setNumber("Terminate", 0) } [/code][/QUOTE] Optimized: [code]@inputs Pod:wirelink interval(500) #Doesn't need to be faster. Pod["Terminate",number] = Pod["Entity",entity]:driver() != owner() #If the driver isn't you, terminate. #You could of course put those print messages in here if you want.[/code] [editline]04:03PM[/editline] [QUOTE=Balto-the-Wolf-Dog;17857035]can you make me suspension?[/QUOTE] An applyForce suspension or what? I've tried that once but failed. Although that was a while ago. Making a suspension out of applyForce sucks. The best suspensions are either rope tool, elastics, or weight changing. [editline]04:05PM[/editline] [QUOTE=Balto-the-Wolf-Dog;17850266]When I say dampening I am refering to making something resist pitching, rolling, and yawing. I want it to smooth the movements of my touchy vtol[/QUOTE] Use Delta: [code]@name Delta example @inputs Pitch @outputs Pout Pout = -Pitch - $Pitch * 4 #Copy this code for Yaw and Roll[/code] Wire some thrusters to this to stabilize the prop.
  • Avatar of fightnight22
  • I need an e2 that makes a yellow exclamation point (!) above your head. Sorry but im new to Expression 2
  • [QUOTE=fightnight22;17859847]I need an e2 that makes a yellow exclamation point (!) above your head. Sorry but im new to Expression 2[/QUOTE] This can be done with the hologram functions. But I have no idea how to use them, so I'll let Divran help ya thar
  • Avatar of Divran
  • [QUOTE=fightnight22;17859847]I need an e2 that makes a yellow exclamation point (!) above your head. Sorry but im new to Expression 2[/QUOTE] [code]@name !!! @persist @trigger O = owner() # | holoCreate(1,O:pos()+vec(0,0,120)) holoScale(1,vec(1,1,3)) holoColor(1,vec(255,255,0)) holoMaterial(1,"models/debug/debugwhite") holoAng(1,O:angles()) # . holoCreate(2,O:pos()+vec(0,0,90)) holoColor(2,vec(255,255,0)) holoMaterial(2,"models/debug/debugwhite") holoAng(2,O:angles()) holoParent(1,O), holoParent(2,O) [/code]
  • Avatar of Infinity1995
  • An e2 that aims where I aim and floats NOT above my head but about 1 meter of the floor Ps: you weld the e2 on any prop and it does it.
  • Avatar of Divran
  • [code]@name Yet another turret @persist E:entity Ang:angle StartPos:vector @trigger runOnTick(1) if (!E) { E = entity():isWeldedTo() StartPos = E:massCenter() + vec(0,0,E:boxSize():z() + 50) } else { E:applyForce(((StartPos-E:massCenter())*10-E:vel())*E:mass()) #You will need to change "Multiplier" for each different prop. But it must always be negative. Ang = ang(E:elevation(owner():aimPos()),E:bearing(owner():aimPos()),E:angles():roll()) * -Multiplier E:applyAngForce(Ang+$Ang*5) }[/code] [highlight]UNTESTED[/highlight]
  • Avatar of fightnight22
  • [code]@name GM_Construct Snow runOnTick(1) if(first() | duped()){ print("GM_Construct Hologram")#prints one message print("For use on GM_Construct and other small maps")#prints another message entity():setAlpha(50)#sets chips alpha (opacity) holoCreate(1)#creates first hologram holoModel(1, "plane")#makes the model cylinder holoScale(1, vec(9999,9999,9999))#scales the first hologram } #changes to disco color :D #changes positions holoPos(1, entity():pos())#makes the hologram follow the chip [/code] Can you make that have a cs:s snow texture? [editline]05:06PM[/editline] sorry but im new to e2
  • Avatar of Divran
  • [QUOTE=fightnight22;17916430][code]@name GM_Construct Snow runOnTick(1) if(first() | duped()){ print("GM_Construct Hologram")#prints one message print("For use on GM_Construct and other small maps")#prints another message entity():setAlpha(50)#sets chips alpha (opacity) holoCreate(1)#creates first hologram holoModel(1, "plane")#makes the model cylinder holoScale(1, vec(9999,9999,9999))#scales the first hologram } #changes to disco color :D #changes positions holoPos(1, entity():pos())#makes the hologram follow the chip [/code] Can you make that have a cs:s snow texture? [editline]05:06PM[/editline] sorry but im new to e2[/QUOTE] [code]entity():setAlpha(50) #<- Opacity holoCreate(1) #<- Create the hologram holoModel(1,"plane") #<- Turn it into a 2d plane holoScale(1,vec(5000,5000,1)) #<- Make it very big holoMaterial(1,"here") #<- Put the css snow texture file path here, without .vtf or anything holoParent(1,entity()) #<- Parent it to make it follow the e2 around (doesn't use runOnTick and therefore 0 ops!)[/code] You're going to have to find the material for the snow yourself.
  • Avatar of Balto-the-Wolf-
  • EDIT: There is an E2 I am more intrested in. I need an e2 that simply aims where I aim and can be linked to a seat so that it only operates when I am in the seat. Essentaily a wire facer. I dont want it to hover, just look where I do
  • Avatar of Divran
  • [QUOTE=Balto-the-Wolf-Dog;17936070]EDIT: There is an E2 I am more intrested in. I need an e2 that simply aims where I aim and can be linked to a seat so that it only operates when I am in the seat. Essentaily a wire facer. I dont want it to hover, just look where I do[/QUOTE] Get the "Yet another turret" code above and remove the "applyForce" code, leaving only "applyAngForce".
  • Avatar of Balto-the-Wolf-
  • kk thanks. You are awsome. Is there a way to link it to a seat and have it operate only side to side and not up and down? I want this for directing podracer pods, so i can have a mouse steering one.
  • Avatar of pedroion
  • [QUOTE=Balto-the-Wolf-Dog;17826493] And and E2 that causes selected props to fly at your crosshair on command with great velocity: [code]@name MatadorForAll @persist E:entity O:entity Hold Attack Dest:vector Vec:vector Ang:angle if(first()){ #Make the angle for the death ball to spin randomly A = 45 Ang = ang(randint(-A,A),randint(-A,A),randint(-A,A)) * 50000 #Hide the chip entity():setColor(0,0,0,0) O = owner() runOnTick(1) } Pos=E:pos() #Spin the ball randomly E:applyAngForce(Ang+$Ang*5) #Only hover if the owner is alive if(O:isAlive()){ #If holding, then move the chip above the owners head if(Hold){ #Set Destination Dest=O:pos()+vec(0,0,(200+E:radius())) #If the ball is close, move slowly and accurately if(Pos:distance(Dest)<50){ Attack = 0 Vec=(Dest-Pos)*E:mass() E:applyForce(Vec+$Vec*5) } #If its far away, move quickly else{ Vec=(Dest-Pos)*E:mass()*Pos:distance(Dest)*50000 E:applyForce(Vec) } } #If the owner left clicks, start the attack sequence if(Attack==0&O:keyAttack1()&E&O:aimEntity()!=E){ #Just incase it gets stuck stoptimer("ManualReset") timer("ManualReset",3000) Dest=O:aimPos() Hold=0 Attack=1 } #Attack Code - Strikes the spot once if(Attack==1){ Vec=(Dest-Pos)*E:mass()*50000*Pos:distance(Dest) E:applyForce(Vec) #When the ball reaches its target, go back to holding if((Pos:distance(Dest)<20)){ Attack=2 Hold=1 } } #Attack 2 code - Flys constantly at the spot if(O:keyAttack2()&E&O:aimEntity()!=E){ Attack=0 Hold=1 Dest=O:aimPos() Vec=(Dest-Pos)*E:mass()*50000*Pos:distance(Dest) E:applyForce(Vec) } if((O:keyUse()|O:keyAttack1()|O:keyAttack2())&!E){ print("ERROR: No prop selected") } #If porp is stuck, return to owner if(clk("ManualReset")){ Attack=0 Hold=1 } #Prop selection code if(O:keyUse()&O:aimEntity()&O:aimEntity()!=E){ #Set the old prop to 5 mass and remove the trail E:setMass(5) E:removeTrails() #Designate the new prop and play with its properties E=O:aimEntity() E:setMaterial("models/debug/debugwhite") #E:setMaterial("models/props_combine/metal_combinebridge001") E:setMass(80000) print("Prop selected") Hold=1 } }[/code] ^instructions: Press E on a prop, to select it. With MB1 you order the prop to go somewhere, by holding MB2 you do the same shit, but if you release it it comes back to your head.[/QUOTE] It was me who posted it :) Made by a friend of mine by request. Just a simple copypasta. And Matador means Killer, in Portuguese and Spanish (I guess). @Topic: Divran, you got one of the best topics out here, congratulations and kee up ze good wörk. I was wondering if you ever used the Gyro-Pod. Would you make an E2 that turns any vehicle into something like it?
  • Avatar of Divran
  • [QUOTE=pedroion;17944988]I was wondering if you ever used the Gyro-Pod. Would you make an E2 that turns any vehicle into something like it?[/QUOTE] Wayyyy too hard for me. But a guy named Techni made one, and I helped him optimize it. [url]http://www.wiremod.com/forum/contraptions-saves/14446-fully-3d-mouse-controlled-flight.html[/url] Here is the post with the newest code: [url]http://www.wiremod.com/forum/contraptions-saves/14446-fully-3d-mouse-controlled-flight-5.html#post141172[/url]