Scrap Mechanic

Scrap Mechanic

Not enough ratings
Super-Positioner [Advanced] (glitch-welded)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
17.706 KB
4 Oct, 2018 @ 5:55pm
4 Oct, 2018 @ 5:57pm
2 Change Notes ( view )

Subscribe to download
Super-Positioner [Advanced] (glitch-welded)

Description
The Super-Positioner is a module that helps you get more control over controllers by manipulating their input. A vanilla controller can only be powered to do whatever it's configured to do. With this you can also dynamically manage the rotation of bearings/length of pistons, make them stop at any position and change their speed based on sensors or on the push of your buttons. It opens up the way for more precise mechanisms and smarter machines!

This Advanced version of the Super-Positioner comes with:
- A back and forth button with custom speed
- A back and forth button with the default speed defined in the controller itself
- A timer to configure a custom speed
- A red output logic gate to attach to your controller
Without any player input, this version will just freeze your controller movement

Notice: Blueprint contains decoration blocks and illustration parts. Download first, then remove and save.

Tip: If you don't want to use this module to power your controller at max speed, just remove the blue buttons and logic gates. It's save.


For what should you use this?

The obvious use is for construction machines such as bulldozers with extendable and rotating arms or anything similar. Personally, I needed a way to precisely manage the rotation of my hovercraft thrusters, and also the speed at which they would rotate. I hooked them up to some sensors and they now make my hovercraft stay perfectly levelled and react to any extra weight or vertical momentum to reduce the shock accordingly. If you want to see it yourself check out it out here:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1527985325


How it actually works

This thing powers your controller with a 1-tick perfect clock. It goes on, off, on, off very rapidly and makes your bearings or pistons almost stop at their current position. They still move, but only as far as they are allowed to do in 1 tick configured in the speed of your controller. They go forth one frame, then back one frame, never really leaving their position. That means, the lower the speed configured in the controller the more they stay still.

When you make the bearings or pistons of your controller move, the delay of the timer is used to determine when an extra frame is added in this on/off cycle. This makes it stay on or off one frame longer, making them move very smooth and slowly back or forth. So basically the delay configured in the timer defines how many ticks the bearings or pistons move per second. But how fast they actually move in one frame is still configured in the speed of the controller itself.


Don't try to make it yourself

You're first going to bump into some problems with prime numbers that will cause unpredictable results. Which is quite hard to understand. Also trying to make a clock 1-tick clock freeze for only 1 tick extra is a lot harder than 2 or more, but is necessary to make the movements as smooth as possible. Luckily I solved both problems in this module.



Extra

If you only need the timer mechanism with the custom speed without the buttons, download the Basic version.
Link: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1528566967

If you only need the clock to make your controller stop moving, download the Loop Gate by Legofreak.
Link: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=756451754


Credit: Legofreak for using his loop gate
Creator: Tomatsu
1 Comments
bones_was_here 20 Apr, 2019 @ 4:29pm 
This is a brilliant piece of scrap engineering: pulse width modulation of a controller :lunar2019grinningpig: