Introduction to Plugs
From GMod Wiki
Contents |
Plugs
- This tutorial will introduce you to the great world of plugs! It has a few tutorials and explanations to how plugs work.
Introduction
- When thinking about plugs, think them as a real plug and socket.
- For instance. In your room, there is a socket on the wall. The socket gets electricity. In Wire, electricity is shown by numbers.
- One or larger means electricity is on. 0 means electricity is off.
- You have a lamp and it has a plug connected to it. You attach the plug to the socket and the lamp gets electricity.
- In Wire, the lamp is getting a value of 1.
- Keep that in mind when creating plugs and sockets.
Simple Plugs
- When you understand how to plugs work in Wire, you can do all kinda cool stuff.
- The most simplest way of using plugs is a lamp.
- Here is a simple tutorial on using them: (NOTE! This has been copied from my another tutorial!)
Simple Plug Lamp
- You will need:
- WireMod
- PHX (Optional but highly recommended)
- SmartSnap (Optional)
- Building:
- 1. Spawn a PHX plate or other prop you would like to use. (I suggest 1X1)
- 2. Weld the plate sideways to the ground.
- 3. Spawn a PHX 1X2 plate or other prop you would like to use.
- 4. Weld it sideways to the ground as you did with the 1X1 plate.
- 5. Go to the Wire tab and choose the Plug.
- 6. Place the socket to the 1X1 plate and the plug to the socket.
- 7. Choose the Lamp or Light tool (No matter wich one)
- 8. Place the lamp or light to the 1X2 plate.
- 9. Choose the Constant Value
- 10. Make the Constant Values values as: 1 Value, Value 1: 1
- 11. Place the Constant Value next to the socket.
- 12. OPTIONAL: Make a rope connecting the Plugs end near the lamp or light.
- Wiring:
- 1. Wire the Socket A to the Constant Value.
- 2. Wire the Lamp (I dont remeber the input) to the Plug A
- 3. You are finished!
- Testing:
- Attach the plug to the socket. Does the light/lamp switch on? If it does, congratulations! You made your own plug lamp! If not, see if the wiring is correct.
More Advanced Plugs
- NOTE! This part contains a small walkthrough for HL2 EP2! Do not read if you dont want to spoil the puzzle!
- You can use plugs in many different ways! For instance, in HL2 EP2, there is a part where you will have to use plugs in order to get electricity to the radio station.
- You will also need to get power for the elevator to get out. But there is a problem. The wire provided to the elevator is too short! You will have to replace it with the another wire that is in the generator.
- You can achieve that same in Wiremod!
Making wires with plugs at both ends
- Making:
- 1. Go to the Wire tab and select Plug tool.
- 2. Spawn two plugs by clicking the right mouse button. We will call the two plugs as Plug1 and Plug2.
- 3. Wire the Plug1 A to the Plug2 A
- 4. Wire the Plug2 A to the Plug1 A
- 5. Create a rope connecting the two plugs.
- You are finished! You can adjust the wires length by adjusting the ropes length.
Creating "extension cords"
- Making:
- 1. Spawn a prop that is big enough to fit 3 sockets in it.
- 2. Create 3 sockets to the prop you chose.
- 3. Create 1 plug but dont attach it to the sockets.
- 4. Wire each one of the sockets to the Plug A
- 5. Attach the plug somewhere where it will get a value of 1 or bigger.
- You are finished! Attach some plugs to the sockets and they will get a value of 1 if you wired everything correctly.
Expert Plugs
- Plugs can also be used in expert levels. One good example is a Advanced Pod Controller car. Think it about as an electric car. You need a Plug to be connected to a Socket before you can drive it.
- When you have made an Advanced Pod Controller car, you can add Gate-Comparison-Equal to every output of the Advanced Pod Controller.
Making an Electric Car
- Making:
- 1. Build your car that uses Advanced Pod Controller. I assume you know how to do that.
- 2. Add a Socket and a Plug.
- 3. Place the socket somewhere and the plug near your car.
- 4. Add Gate-Comparison-Equal's as much as you used the outputs of the Advanced Pod Controller.
- 5. Wire every Gate-Comparison-Equal A to the Plug and every Gate-Comparison-Equal B to the Advanced Pod Controller.
- 6. Wire the movement stuff (Thrusters, wheels etc.) to the Gate-Comparison-Equal's
- Simply, you just add a Gate-Comparison-Equal between every wire connection.
- You are finished! Attach the Plug to the Socket (Make sure the Socket is giving out a value greater than 0!)
- Then try driving your car. Does it move anywhere? If it does, try un-attaching the Plug. Does the car move anywhere anymore?
Credits
- Thanks to these people who helped me create this!
- No one yet!
- No one yet!
- No one yet!
- No one yet!
- NOTE! You CAN add your own plug tutorials in here! Just remember to add your name under the Credits section!
--Funley--