Self-Connecting Power Lines

So the idea here was to quickly make something that’s worth of being a promoted model. What you do is place them around your game and they connect themselves. They prefer to connect to poles that are facing a similar direction and that are somewhat forward from where they’re facing (indicated by the yellow arrow (yes it gets removed when it runs)).

The scripts in them (one per pole) work together to maintain the entire system. There can be multiple networks of poles and you can have multiple poles leading into one.

There aren’t any limitations on how you can connect them as long as you put one in front of the other, so you can place them around your map wherever you want.

In terms of performance it doesn’t do any optimization with initially generating the lines and it only updates the connections and lines if one of the node parts (A, B, C, D) changes its position. The lines also don’t archive so you don’t need to worry about them screwing up your saved. Please let me know if you guys find any bugs or have stuff you want me to add/change. Thanks!

EDIT: Made a plugin that allows you to view your connections at a lower quality level from edit mode without running the game. Once again the lines are non-archivable. http://www.roblox.com/Self-Connecting-Power-Line-Visualizer-item?id=191834234

2: Apparently handles get removed from inserted models?? The plugin now handles the handles.

3: Optimized and polished. Ready for submission.

2 Likes

No wonder why my internet has been so slow
[size=1]tech pun[/size]

Ew, ugly crisscrossing. Updated the rotation detection so it doesn’t do that anymore.

You should make a plugin that lets you see how they connect in edit mode.

That tempts me to upload the connection code to a modulescript so it will be synced through all the poles and plugins. Probably a good idea. I’ll do it.

That tempts me to upload the connection code to a modulescript so it will be synced through all the poles and plugins. Probably a good idea. I’ll do it.[/quote]

Holy crap what are you doing up at 6 AM on the west coast?

That tempts me to upload the connection code to a modulescript so it will be synced through all the poles and plugins. Probably a good idea. I’ll do it.[/quote]

Holy crap what are you doing up at 6 AM on the west coast?[/quote]

If there’s one thing I learned from home schooling it’s that sleep cycles are a lot like trust. Once you lose it it’s gone.

That tempts me to upload the connection code to a modulescript so it will be synced through all the poles and plugins. Probably a good idea. I’ll do it.[/quote]

Holy crap what are you doing up at 6 AM on the west coast?[/quote]

If there’s one thing I learned from home schooling it’s that sleep cycles are a lot like trust. Once you lose it it’s gone.[/quote]

But it can be built up again through time and hard work. Anyways, this model is really nifty - it’s simple to use and looks nice in many places.

I’m really temped to put this in my game somewhere once I get home in a few days. I’ll give you credit if I do

now make them work with the ROBLOX wiring mechanism.

It was fun making a drawing with them XD

I have no idea what that is but ayyyy.

anyways, this is pretty neat :smiley:

Tadaa

I decided that instead of using modules I’d just run the code straight from the scripts. Displays at a lower quality level in studio since you’ll be moving them around more often. Also comes with a spawner button.

Rewrote the code to polish and optimize it. I think it’s ready to be submitted for the model maker contest. Don’t worry about updating your plugin, I’m far too lazy to write it in such a way that requires me to rewrite two scripts.

Only connected poles are rebuilt when they move, so as long as you’re only moving a small number at a time you’ll have a nice smooth framerate. Here’s 64 poles running at 40-50 FPS while I’m constantly moving one around.