Stormworks: Build and Rescue

Stormworks: Build and Rescue

respat Aug 19, 2019 @ 4:48pm
Elevator indicator problem
Hi guys!

I created an elevator, and i want to blink 2 paintable indicators while the elevator moving up or down. I want to control it only with one push button. I tried almost everything. Distance sensor, alt sensor etc. But I don't know how to connect them to work.

If I push the button, elevator lifting up, and I want to blink up the up arrow on the indicator, when I push it again, I want to blink the down arrow. When the elevator is stopped on a floor, blinking stops. If I push the button again, while the elevator is moving, it switch to the another indicator. It is simple, but I don't know how can I do it.

My english is not too good, but i hope understandable.

Anyone can help me?
I taken some pictures, there is the indicator lights and the blueprint. https://m.imgur.com/gallery/RjjG4Xd
< >
Showing 1-6 of 6 comments
Unit 744 Aug 19, 2019 @ 5:45pm 
Hello. I have never built an elevator before, but I have plans on building one soon, so I might as well learn as well as help you. First, I have a few questions for you:

1. Is this just a two-floor elevator? I would assume so, since you are only using one push button.

2. Is this an accurate description of how you want the elevator to work (assuming only two floors)?:

Elevator starts on floor 1, both indicators off.
Push the button; elevator starts moving up to floor 2, up indicator on.
Elevator arrives at floor 2; elevator stops moving, both indicators off.
Push the button; elevator starts moving down to floor 1, down indicator on.
Elevator arrives at floor 1; elevator stops moving, both indicators off.


3. How are you moving the elevator? Pistons, a winch, etc.?


I am going to work on this myself and see what I can come up with.
Unit 744 Aug 19, 2019 @ 6:27pm 
Alright, I think I have something for you. Two-floor piston elevator with one push button and the indicators.


https://imgur.com/3Im1Tu3


Microcontroller with 2 inputs: Push button in, Piston rod length in; and 3 outputs: Piston length out, Up indicator out, Down indicator out.


Describing the microcontroller:

The constant inputs to the numerical switchbox are the up/down piston lengths. Adjust as needed for your floors. +/- 1 fully extends and retracts the piston.

The multiply (by 0.5) is because the piston outputs a length of 0.5 when you ask it to fully extend (inputting target of 1).

The subtract (current length minus target length), less-than, and greater-than determine which direction the piston will be moving (or not moving at all if target = current). The reason I used +0.02 and -0.02 is to create a 'not moving' tolerance band. The piston never actually outputs exactly +/- 0.5, so this band gives the game some tolerance. If you notice the indicators are flickering when they should not be, try expanding this tolerance band (e.g., try +/- 0.03).


The only things you should need to adjust here are the up/down piston lengths in the switchbox, which I made +/- 1, and the tolerance band to resolve flickering. The rest of the logic will automatically adjust itself to these changes.
respat Aug 19, 2019 @ 6:36pm 
Thank you for the answer! I don't use pistons, I use linear track bases, and I can't read the current height with it.
I have a distance sensor on the bottom of elevator's floor, that can measure the distance, but i don't know how can I use it right.

https://imgur.com/a/qCjErrj
ericxuanqk Aug 19, 2019 @ 7:21pm 
try using linear speed sensor and set it into vertical mode. Up should be + and down should be -; I have never done any elevators but this would probably work
Woodspeople Aug 19, 2019 @ 7:25pm 
Threshold gates connected to the distance sensor should do the trick (bottom is 0-1, top is max height -1 to max height +1)
Last edited by Woodspeople; Aug 19, 2019 @ 7:26pm
respat Aug 19, 2019 @ 7:37pm 
Thank you guys! It is solved!
There's the solution.
https://imgur.com/a/unR2Y9b
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Aug 19, 2019 @ 4:48pm
Posts: 6