• [E2] Garry The Buddy
    3 replies, posted
Hello guys! As I've been making E2s in the game for about a month now, I wanted to show you my first finished contraption. It(He)'s called Garry. He's a bot that follows you around, and is controllable with chat (some functions, some are buggy) [B][U]CODE:[/U][/B] [CODE] @name Garry @inputs Tie @model models/props_junk/watermelon01.mdl @persist Vector:vector #Made by Pefu19, 2013 #Do not remove the hint on the end. #If you're going to post the code somewhere, give me credit O = owner() E = entity() ###CONFIG### PropCore = "true" #[NOT WORKING]#CuteFace = "false" ###CONFIG### ###CURRENT CHAT COMMANDS### #NOT WORKING#Garry reboot - reboots Garry #Garry be red/green/blue - changes color #Garry party - parties #Garry change color - the same what the one above does (fixing it ATM) #Garry reset color - resets Garry's color #Garry gtfo - removes Garry :( (why would you do that though) #Say Garry to reset constant commands interval(1) #[for(VAR=1,460) { if(random(100000000000)<10) { concmd("say lol") } }]# #basic color cmds# #red if(O:lastSaid()=="Garry be red") { E:setColor(vec(255,0,0)) } #green if(O:lastSaid()=="Garry be green") { E:setColor(vec(0,255,0)) } #blue if(O:lastSaid()=="Garry be blue") { E:setColor(vec(0,0,255)) } ## LastSaid=owner():lastSaid():explode(" ") if(owner():lastSaid()=="Garry party") { for(VAR2=1,130) { entity():setColor(vec(random(255),random(255),random(255))) } } if(owner():lastSaid()=="Garry change color") { entity():setColor(vec(random(255), random(255), random(255))) reset() } if(owner():lastSaid()=="Garry reset color") { entity():setColor(vec(255,255,255)) } if(Tie==0) { Vector=owner():pos()-(entity():pos()-vec(25,0,25)) applyForce($Vector*30+Vector) setName("GarryPet Following") } if(Tie==1) { setName("GarryPet Staying") } if(owner():lastSaid()=="Garry gtfo") { print("Why would you do that :[ You Monster") selfDestructAll() } if(PropCore=="true") { timer("po", 60000) if(clk("po")) { propSpawn("models/props_lab/jar01b.mdl", 0) hint("Garry just made a poo. Eww.", 7)} if(owner():lastSaid()=="Garry take a shit") { propSpawn("models/props_lab/jar01b.mdl", 0) } } if(CuteFace=="true") { #eye1 holoCreate(1) holoPos(1, entity():pos()+vec(1,0,30)) holoCreate(2) holoPos(2, entity():pos()+vec(2,0,30)) holoAng(1, ang(0,0,45)) holoAng(2, ang(0,0,-45)) holoScale(1, vec(0.1,0.1,0.3)) holoScale(2, vec(0.1,0.1,0.3)) } if(first()) { hint("Made by Pefu19", 7) #Do not remove this hint } if(duped()) { selfDestructAll() } [/CODE] FEATURES: -Walks after you -Poops! (on some servers only, propcore required) -Color Changeable! -Chat commands! (kinda buggy right now) -If you want him to stop following you, wire Tie to a constant value (anything that has an output value of 1). BUGS: -The random color command makes a disco (that inspired me to make a separate command for disco mode which makes Garry change colors randomly -Sometimes might get stuck on ledges -Post more if you find any Thanks for reading! Details in the E2 code. Cya! PS: If this thread is in wrong section or something, please move it
How do I install this? I am a complete newbie at installing E2 code. (I've been trying to install the codes of FailCake. but I failz)
Wiremod.com is for such things... [QUOTE=killerapple22;39282018]How do I install this? I am a complete newbie at installing E2 code. (I've been trying to install the codes of FailCake. but I failz)[/QUOTE] Open the E2 Editor and paste the code. Save it and spawn it on the ground.
[QUOTE=pefu19;39271882] [code]if(CuteFace=="true") { #eye1 holoCreate(1) holoPos(1, entity():pos()+vec(1,0,30)) holoCreate(2) holoPos(2, entity():pos()+vec(2,0,30)) holoAng(1, ang(0,0,45)) holoAng(2, ang(0,0,-45)) holoScale(1, vec(0.1,0.1,0.3)) holoScale(2, vec(0.1,0.1,0.3)) } [/CODE][/quote] Have you ever considered parenting?
Sorry, you need to Log In to post a reply to this thread.