Making a microwave using wiremod
From GMod Wiki
This tutorial is going to teach you how to make a wire mod microwave.
Parts Needed
- (1)Expression 2 chip
- (2)Buttons
- (1)Timer gate
- (1)Round gate
- (2)Wire ignite
- (1)Wheel (optional)
- (1)Screen
How To
First you are going to want to make some type of a prop that looks something like a box or microwave. After that you need to go into your tool menu and find the Expression 2 gate then select new Expression and it should open a code editor, if you have got that far then you will need to enter this code:
@name Microwave processor @inputs Start Reset @outputs Time_count Time_reset Ignite Wheel @persist @trigger All interval(1000) if(Start == 1) {Ignite = 1, Time_count = 1, Wheel = 1} else {Ignite = 0, Time_count = 0, Wheel = 0} if(Reset == 1) {Time_reset = 1} else {Time_reset = 0}
If you put all the code in correctly your program should work.
Time to wire it all up, First spawn the expression chip on your prop (a wall also works on a wall it is just kinda lame) Second spawn your round, timer, igniter, and wheel on your prop (or wall).
Now wire everything like this:
- Expression input (Start) to your button with toggle on
- Expression input (Reset) to your button with toggle off
- Timer input (Run) to your Expression with output (Time_count)
- Timer input (Reset)to your Expression with output (Time_reset)
- Round input (A) to your Timer chip no output
- Screen (A) input to the Round chip no output
- All of your Igniter input (A) to your Expression chip output(ignite)
- Wheel input (Go) to your Expression chip output (ignite)
So if you wired and programmed everything correctly when you press start the wheel should spin, the igniter should ignite everything, and the screen should start counting,
and if you press reset everything should reset.
And there you go you have a microwave.
If you see any errors with this page feel free to edit it. And thank you for reading.:^)
Additional Notes
- If you want to learn how to write code for E2 look at this link:
http://www.wiremod.com/forum/wiremod-tutorials/11041-beginners-guide-expression-2-a.html