Space Engineers

Space Engineers

View Stats:
This topic has been locked
Why can't you stop a piston..
You can extend, you can retract, you can reverse.. you can't stop. Why?
< >
Showing 1-10 of 10 comments
Mojo Jul 17, 2021 @ 1:58pm 
Kill the power to it, it will stop. :)
You can also set the distance that you need it to stop at either at max or min value.
Dan2D3D  [developer] Jul 17, 2021 @ 2:11pm 
Hi, I don't know why but you may also use the "Reset Velocity" to 0 to stop it.

__

Info +

One particiapant created a new vote Feedback (Petition) on the Portal where the Devs choose from the most wanted so you may want to go post a good reason why it's needed, that will push this Petition on the front page and help the members asking for it.

https://support.keenswh.com/spaceengineers/pc/topic/set-default-piston-velocity-to-0
Last edited by Dan2D3D; Jul 17, 2021 @ 2:12pm
Mollymawk Jul 17, 2021 @ 3:32pm 
you know the speed. just turn it on/off with timers.

or if you are not short of space, use more pistons. extend one. extend the next, then the next:
bingo multi stage pistons. you can even zigzag and have some reversed so they pull to get longer.

I sometime use a script, a PB with run arguments, length and speed i can call from a button/timer/sensor.

Edit: located my move_piston function

use it something like this:
void move_piston(IMyPistonBase piston, float new_position, float speed)
{
new_position = Math.Abs(new_position);
speed = Math.Abs(speed);
Echo("Moving: " + piston.CustomName);
Echo("To Position:" + new_position.ToString());
Echo("Speed:" + speed.ToString());
if (piston.CurrentPosition > new_position)
{
piston.MaxLimit = piston.HighestPosition;
piston.MinLimit = Math.Max(new_position, piston.LowestPosition);
piston.Velocity = -speed;
}
else
{
piston.MaxLimit = Math.Min(new_position, piston.HighestPosition);
piston.MinLimit = piston.LowestPosition;
piston.Velocity = speed;
}
piston.CustomData = "Position = " + new_position.ToString("#,##0.00");
}

public void Main(string argument, UpdateType updateSource)
{
string[] x = argument.Split(',');
IMyPistonBase p = (IMyPistonBase)GridTerminalSystem.GetBlockWithName( x[0] );
move_piston( p, float.Parse(x[1]), float.Parse(x[2]) );
}

call the pb with arguments [piston name].[position],[speed]
e.g. Piston 1,0.5,2
Last edited by Mollymawk; Jul 17, 2021 @ 4:16pm
Commander_Black Jul 17, 2021 @ 4:34pm 
If you need it to stop because you want it to open only half way, just set the maximum distance to 5.0 and then reverse it to make it extend.
harlequin_corps Jul 17, 2021 @ 6:24pm 
or.. maybe.. Just thinking outside the box here, just throwing this out there.. run it up the flagpole and that.. have a button that says "stop" next to the buttons for "extend" and "retract".
harlequin_corps Jul 17, 2021 @ 6:25pm 
For extra ribbed pleasure have a momentary "extend" and "retract" button.
Lystent Jul 18, 2021 @ 5:39pm 
Originally posted by Mojo:
Kill the power to it, it will stop. :)
You can also set the distance that you need it to stop at either at max or min value.
Good pointers there. Pistons get locked pretty well and instantly when shut down. As for the min/max travel distance, once the piston head is within the range of the two, it will not leave. You can also, say, slowly increase the max distance while having the piston set to extend as an alternative method of finding how far you want it to go.
Silent1killer Jul 18, 2021 @ 5:57pm 
I usually use the maximum distance setting which will allow you to move it in small increments so you can back out of the control panel and look at it. GL
NateRadiant Dec 4, 2023 @ 7:01pm 
Originally posted by harlequin_corps:
or.. maybe.. Just thinking outside the box here, just throwing this out there.. run it up the flagpole and that.. have a button that says "stop" next to the buttons for "extend" and "retract".
Found this very helpful. Thank you. :steamthumbsup: :)
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Jul 17, 2021 @ 1:56pm
Posts: 10