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.
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.
I think i have an idea…
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.
I get it, It finds the nearest doors location and spawns an unlock item
exactamundo (☞゚ヮ゚)☞
The only issue is i still need the visual display of the wire lighting up and the door opening when the activation hits it
hmmm. I have an idea, but it’s beta.
Thunderdome sounds
ominous Dun Dun Dun
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:
- PowerButton - click to generate power
- PowerSwitch - place these near each other to connect together (like redstone)
- Powerable - a block that activated when it gets power from a button or wire
Try it here:
Ight damn
I wuz gunna make an example but yea that’s way better demonstrated
(also haha funni maymay)
Rick be rolling, But awesome example! This example could be the very useful for maybe games with a level editor lol
Now what you have to do is make it a push button function so it turns off when not on
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
That should work, This example is very useful aswell
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.
Or you could have an NOR gate hooked up
True, but then you’d have to keep the electricity emit on and that would get complicated
Well technically if the buttons always emitting it while on it should do just fine
Oh right my bad