Creating Custom Puzzles + Tutorial for a basic security door circuit

Status
Not open for further replies.

k1lly0u

Administrator
Staff member
Lets start off with a few notes:
- You need the RustEdit extension and Oxide/uMod installed on your server for IO to work on your map - https://github.com/k1lly0u/Oxide.Ext.RustEdit/ - https://umod.org/

- All the IO prefabs that are intended to be used in maps can be found in the prefab list under Assets/Prefabs/IO.

- I have also made the player deployable IO prefabs use-able but it yet to be determined whether there are any negative implications of doing so. You can find the player deployables in Assets/Prefabs/Deployable/Playerioents

- Before you get started making IO connections, ensure that you have IO connection visible by selecting the 'IO Connections' button and toggling the 'Show IO Connections' toggle to on. If you dont do this you will not see connections
io2.png


- All IO circuits will require power. If you do not have a Electric Generator at the start of the circuit then the circuit will not work.

- IO prefabs have input and output slots. Some prefabs may have no output slots, but for the ones that do I have made the amount of output slots you can create unlimited, however input slots respect how they were designed. For example a Simpleswitch only has 1 input slot, where as a ORSwitch has 2 input slots.

- You create connections by selecting the prefab and clicking 'Create Output Connection' on the transform tool panel. You then click on another IO prefab and select the target input slot to make a connection
189b9b30bc48276eafd7f9bc0121b043.png


- You can cancel connecting a circuit by pressing the right mouse button

- You can clear input or output connections to a object from the transform panel

- After you make a connection a line will be drawn between the 2 objects and each end of the line will tell you how they are connected
1d05b6d6970c87c5552b6bf61fa9665f.jpg



Ok, tutorial time!
In this short tutorial we are going to create a simple security door circuit with a fuse box, a card reader on 1 side of the door, and a push button on the other

Before we begin;
Security Doors are not an IO component, meaning you can not just connect it to the circuit. To use doors in your circuit you use a door manipulator

To set this up we will need to add the following items to our map;
- Generator (Generator.static)
- Fusebox
- Cardreader
- Pressbutton
- ORSwitch
- Doormanipulator
- Any kind of security door (that does not have "static" in the name). We want a security door because players can not interact with it like a normal door

All of these items can be found under Assets/Prefabs/IO in the prefab list

Here I have arranged them for this demonstration
2019-06-08-17-19-01.jpg
2019-06-08-17-19-08.jpg


Now how we want this to work is;
The card reader and the push button will open the door
The card reader will only have power when there is a fuse in the fusebox
The push button will always open the door (because we dont want players trapped inside)

Step 1:
We want to connect the generator to both the fuse box and the press button. Click on the generator and then press 'Connect IO Output To...'. This will draw a line that will follow your mouse.
Move your mouse over to the fuse box and click on it.
This will show you a prompt to select which input slot you want to connect to. The fuse box only has 1 input slot so select 'Power In'
Lets do the same for the press button
3c44c94daed575595674f87b027af3e0.jpg


Step 2:
Now lets connect the fuse box to the card reader the exact same way. Now if we select the card reader we will see a couple of extra options in the IO section of the transform tool.
b86e81819642871845315ac79d7cf406.png

Access Level - Sets which color keycard is required to use the card reader
Access Duration - Sets the amount of time the door will stay open for after using the card reader.
You can set these options to what ever you like

Step 3:
Now lets connect the card reader to the ORSwitch, and then connect the press button to the ORSwitch. We are going to use both input slots on the ORSwitch so it doesn't matter which way we connect them
be7473307a29c23e1cb316f75f11d0e9.png


Step 4:
Finally connect the ORSwitch to the door manipulator. Now take note that the placement of the door manipulator is critical to it detecting the door once ingame. It is best placed on the hinge side of the door within 1m of it. The help with this when you select the door manipulator it will show you with whether it is a valid placement.
You also have 3 actions to choose between for a door manipulator;
Open - Opens the door when there is power and closes it when there is no power
Close - Does the opposite of Open
Toggle - Opens if closed when power is supplied, Closes is open when power is supplied.
We just need to set it to Open for this circuit
f6a806674686b00ad05fe4ebcb568b05.jpg


Step 5:
Crack open a beer and congratulate yourself on a job well done

Here is a video demonstrating this circuit when the IO tools were first implemented

And here is the circuit poorly drawn out
simplesecuritydoor.png
 
Last edited:
Status
Not open for further replies.
Top