Universal Wire System

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

Or you could have an NOR gate hooked up

2 Likes

True, but then you’d have to keep the electricity emit on and that would get complicated

1 Like

Well technically if the buttons always emitting it while on it should do just fine

2 Likes

Oh right my bad :upside_down_face:

1 Like