Space Engineers

Space Engineers

Not enough ratings
Bainy13's XYZ Piston Lift
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
9.885 KB
9 Sep, 2018 @ 10:08am
10 Nov, 2018 @ 4:51am
5 Change Notes ( view )

Subscribe to download
Bainy13's XYZ Piston Lift

Description
This script will allow three set of pistons to be move to pre-determined locations with variable speed and initial delays configured on each axis seperatly

Current Version:
Version: 1.0.2
Date: 2018-09-22

Main features:
Moves groups of three groups of pistons into pre-programmed lengths at a specified speed with an optional initial delay

Basic Setup:
You need one programmable block and one timer
Load the script into the progrmmable block
Set the Piston Group Names
Set the Destinations you desire

Script settings:
This is fairly simple there are two parts

Piston Group Names
Your X, Y and Z pistons MUST be in groups, even is it is only one piston. The names of those groups must be filled into the variables.

string X_Piston_Group_Name = "Piston X";
string Y_Piston_Group_Name = "Piston Y";
string Z_Piston_Group_Name = "Piston Z";

Destinations

new LiftPositionDetail("A", 1, 2, 3);
Tthe above example will be triggered when the script is run with arguement "A", and will move the pistons in piston group X to a TOTAL position of 1, the Y piston group to a TOTAL position of 2 and the Z to a TOTAL position of 3.
Easy right?

new LiftPositionDetail("Name", 1, 2, 3, 4, 5, 6);
Ok so lets add Speeds. The above will do exactly the same as the first but will move the X pistons at a TOTAL speed of 4, the Y at 5 and the Z at 6.

new LiftPositionDetail("Name", 1, 2, 3, 4, 5, 6, 7, 8, 9);
Finally lets add Delay. If yopu pushed a button running the script with the arguement "A" (and the timer block was running every second) the X pistons would wait 7 seconds before moving, the Y would wait 8 and the Z would wait 9.

Known Bugs / Planned Features:
The Guy behind the keyboard
None

Credits:
Many thanks to Isy who, while had nothing to do with the script, provided me with a wonderful template to do both this description and the code comments. The code is mine but hands up stole Isy's formatting

Updates:
2018-09-09 - Published
2018-09-22 - No longer requires a timer block, jeezlus things runs all by istelf now! (Splitsie request)
2018-10-11 - inputs needed to be 0.0f to work, changed the type to double so you can just use 0.0 for the inputs

Feedback:
This was the result of watchign a video after a few beers and going "thats stupid surely theres a better way" and i rather enjoyed the process. So I would love to have some feedback or suggestions for my next weekend consumer :)
2 Comments
Splitsie 7 Nov, 2018 @ 6:21pm 
Hey, I was just trying to set up the tram elevator and unfortunately it's not happy with the decimals in the arguments. When compiling it gives the error cannot convert double to float. Any ideas where I need to change things to get that working again?
Splitsie 9 Sep, 2018 @ 9:20pm 
Nice :)

Especially love the bit about stealing Isy's formatting ;)