• Expression 2 for a 2 floor elevator!
    23 replies, posted
Hi there, i have recently been studying E2 and would like to share what i have learned so far :D This is my code for a 2 floor Elevator: [code] @Name Elevator @Inputs A B C D E F @Outputs H @Persist if(A == 1) { (H = 2) } if(B == 1) { (H = 200) } if(C == 1) { (H = 400) } if(D == 1) { (H = 2) } if(E == 1) { (H = 200) } if(F == 1) { (H = 400) } [/code] [b]How To Wire This!:[/b] You need Buttons, 3 on the elevator, 1 on each floor. Wire the Inputs to the buttons corresponding to the designated height! (A and D would be Ground Floor, B and E is First Floor and C and F is Second Floor). As for the Outputs, you must make Wire - Hydraulics from the Bottom of the elevator to the floor / a prop underneath it which is on the floor (Make sure they are in-line). Put the 4 controllers somewhere NEAR the expression 2 chip, preferably on the same prop. Then, you spawn a smoother from Gate - Time and then spawn a Constant Value of 50+. (Constant Value is the speed at which the elevator Travels) [b]Wire (A) from smoother to Expression 2 Chip (H). (Rate) from smoother to Constant Value. Inputs from Expression 2 to the Buttons. (Explained above!) (Length) from ALL Hydraulics to the smoother.[/b] Please Correct ANY part of the code or Tutorial which may be wrong, otherwise, hope you enjoy this!! Also, Visit my clan's Website, at [url]www.orderofdefileddeath.tk[/url] , so if you need help, i am there :D My username is different than this one on FP, but i want to keep this account going as long as i can :D
so this is creationism? Is this a drawing :P Otherwise i will use this :D
I didn't know where else to put it, and i was eager to become moderately known for a small amount of time :P
I think programming forum would fit better. But what is this?
[QUOTE=edja007;16902504]I think programming forum would fit better. But what is this?[/QUOTE] It is the E2 code i came up with for an elevator, including a written tutorial on how to wire it. Also, sorry for it being in the wrong section, but since i created it i just went along those lines.
I understand this!
[QUOTE=Un.Hxx.AÃ&#402;©;16902800]I undertand this![/QUOTE] That's good, at least you know what all of it means. Oh, and to anybody who wants to know some basic variable things, these are them : - This Means Minus (Obviously) + This Means Plus (Obviously) * This Means Times / This Means Divide && This Means AND || This Means OR ^All of the above are basic statements i have learned through studying a bit of LUA and E2^ EDIT: Forgot these statements: <= This Means Greater than or Equal to >= This Means Less Than or Equal to == This means Equal To
I think this belongs in the Programming forum...
Did you not read my other post? [QUOTE=HeavyMtl123;16902514]It is the E2 code i came up with for an elevator, including a written tutorial on how to wire it. Also, sorry for it being in the wrong section, but since i created it i just went along those lines.[/QUOTE] Anyway, i don't care, if an admin moves it, he/she moves it, simple as.
There's no alarm button! What if I get Trapped!!
[QUOTE=Greeneyes;16907050]There's no alarm button! What if I get Trapped!![/QUOTE] I'm only a beginner on E2, so i will add an alarm button in, so don't worry :P
But.... with no alarm button ninjas can catch me!
[QUOTE=a-cookie;16918561]But.... with no alarm button ninjas can catch me![/QUOTE] Oh well, i will be sure to add an anti-ninja defence system, maybe a turret which activates if a ninja is spotted :P
[QUOTE=HeavyMtl123;16918572]Oh well, i will be sure to add an anti-ninja defence system, maybe a turret which activates if a ninja is spotted :P[/QUOTE] You know a turret can't hit a ninja, hence a ninja.
[QUOTE=johanz;16918594]You know a turret can't hit a ninja, hence a ninja.[/QUOTE] Okay, i will Code a robo-suit which has Quad-Linked Ninja Seeking Missile Launchers, 2 Dual Miniguns on each arm, and can move at the speed of light. No ninja can defeat THAT!
This belongs in the contraptions section.
[highlight]Ninjas can catch you in a elevator with no escape button[/highlight]
[QUOTE=a-cookie;16920012][highlight]Ninjas can catch you in a elevator with no escape button[/highlight][/QUOTE] Thats when you spam the chatbox for help.
I made an E2 that are to be used with the Lift Stool (found together with the Spacebuild Enhancement Project), which opens and closes the doors automatically etc. Handy stuff! Anyway, this IS the wrong section for this kind of thing!
This belongs in the one of the GMod sub-forums.
So what, is this wiremod? If so, why are you calling it E2?
[QUOTE=mynames2long;16922396]So what, is this wiremod? If so, why are you calling it E2?[/QUOTE] Because it's Expression 2.... And i don't think i need to refer to wiremod since anyone who has an I.Q. above 1 should have heard that Expression and Expression 2 is part of Wiremod... EDIT: Also, who the hell keeps rating this dumb? i bet most of those people if not all of them don't know ANY E2
Try the contraptions forum...
[QUOTE=PLing;16925299]Try the contraptions forum...[/QUOTE] I wouldn't call it a contraption, because it is not a MADE product as of yet, i would call it more of a coding thing, y'know?
Sorry, you need to Log In to post a reply to this thread.