Universal Wire System

So i wanna make a wire block that works with any button that will open any door, so instead of making a crap ton of button for a crap ton of doors, it will be 1 door block with 1 button and a wire line. Example of what it should be like: you have the block somehow contact the block to its 4 sides which then that block would do the same causing a domino effect until a door receives the wires contact form whatever activated it. So what i need is someone to help me somehow make this work…

1 Like

Not sure what type of button you want but if it’s like the Portal games then I think there’s a way to do it.


One way to do it would have the button and wires emit an object, which I’ll call energy, in four directions.

When the energy is created it’ll collide with the wire, when it does that the wire will also create energy in four directions to create a chain.

To prevent an infinite loop wires that have been powered will have a switch that’ll turn off after being powered on once.

When the button is no longer being pressed it’ll emit another object, which I’ll call anti-energy, in four directions.

Anti-energy will turn the switches back on allowing the buttons to be pressed again, to stop an infinite loop from happening you have a switch that turns off when it first collides with anti-energy and turn on when energy is passed through it.

For the door, when energy passes through it it’ll open and when anti-energy passes through it it’ll close.

If you just want it to only open once then just cut out the part that includes anti-energy.


Of course, this is just in theory so no guarantee it’ll work.

3 Likes

I’m not sure I understand completely. Initially this sounds like you could just send a message to all “Door” objects and have them open, but after reading it more carefully it sounds like you want something that works like Minecraft redstone dust. Is that close to what you have in mind? Where you have a power source, a series of connected blocks, and a block that can be activated?

1 Like

Both the terms “Minecraft Redstone” and “Portal Wire” Apply, Funny enough its because im making a portal game

2 Likes

I was also thinking of a system like this except using an attachment named powered and rays to its sides detecting for it, Unsure how that would work tho.

1 Like

I’m not all too familiar with the attachment behavior but you could use emmit or spawn to send out signals.
Also, using raycast might create a lot of lag so I would suggest using either proximity or collision to detect when energy is passing through it, it’s a lot more reliable and easy to use.

1 Like

I think i have an idea…

1 Like

So, a callback to my old free version cheat thingy, is the copy-paste switches. Load into the level, scroll a bit, and you’ll see a switch. Look into the code, and the code of the locked door below. That might give you an idea.

1 Like

I get it, It finds the nearest doors location and spawns an unlock item

2 Likes

exactamundo (☞゚ヮ゚)☞

1 Like

The only issue is i still need the visual display of the wire lighting up and the door opening when the activation hits it

2 Likes

hmmm. I have an idea, but it’s beta.
Thunderdome sounds

2 Likes

ominous Dun Dun Dun

2 Likes

Ok, this sounded like an interesting thing to make, so I put together an example. There are three types of objects, but you could very easily add more types of powered components like doors and lamps, or more power sources like pressure plates or switches.

The three object types are:

  1. PowerButton - click to generate power
  2. PowerSwitch - place these near each other to connect together (like redstone)
  3. Powerable - a block that activated when it gets power from a button or wire

Try it here:

4 Likes

Ight damn
I wuz gunna make an example but yea that’s way better demonstrated :joy:

(also haha funni maymay)

2 Likes

Rick be rolling, But awesome example! This example could be the very useful for maybe games with a level editor lol

2 Likes

Now what you have to do is make it a push button function so it turns off when not on

2 Likes

Yeah, that would add some more complexity. I considered it, maybe you can use a “disable” emit similar to the “energy” emitter to turn them off? I didn’t want to get too complicated for a simple example though.

[EDIT] - I just re-read @glowbug’s post and realized that they already said all of this, and I just implemented exactly what was described above :smiley:

3 Likes

That should work, This example is very useful aswell :+1:

2 Likes

Maybe keep the same object, but give it different object value, and have it send a message to the door when it collides instead of collision code within the door so you can customize based on the object value.

2 Likes