Space Engineers

Space Engineers

Not enough ratings
aveBrian's Elevator Script v1.3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
7.313 KB
25 Apr, 2018 @ 8:31am
24 Nov, 2018 @ 6:41am
8 Change Notes ( view )

Subscribe to download
aveBrian's Elevator Script v1.3

Description
Elevator Control Script

This script is designed to make piston-based elevators that service multiple floors easy to set up and control, by controlling the pistons and doors from one easy to use script.

What Does it Do?

Once you have your elevator built, you can set the piston heights to get the elevator car where you want it and use the script to save that position. You can do this as many times and with as many floors as you like. You can set doors on those floors and the elevator car, to open and close automatically when the elevator arrives and departs. You can also configure the script to "lock" the doors so they cannot be opened unless there is an elevator car on that floor.

What's New?

- Improved and streamlined setup.
- Massively improved performance by running the script only when the elevator is moving.
- Clearer, more user-friendly "debug" info displayed on the terminal.

Installation Instructions

Step 1: Build your elevator and load this script into a programmable block.
Step 2: Group this programmable block and all the pistons and doors you want this script to control, together.
Step 3: After adjusting the car to the proper height, run the programmable block with the word "save" as the argument.
Step 4: (Optional) If using doors on the floors and or elevator car and they are grouped with the programmable block, include the word "car" in the name of the door on the elevator. For the other doors, include the word "floor" and the number floor they are on, in any order. EX: "Door floor 2" for the second floor door.

And that's it!
Well, there are a couple of variables adjustable within the code, but they are self-explanatory. They are for locking the doors and displaying debug info. Both on by default.

Final Thoughts

If you've used a previous version of this script, the new setup might break your existing setup and I am super sorry about that. In most cases though, this shouldn't happen. This was necessary to improve the ease of use and setup of the script. If you have any problems, suggestions, or questions, please feel free to leave a comment and I will respond as quickly and completely as I am able.

Thanks for reading :)

28 Comments
fourbones 12 Aug, 2022 @ 3:06am 
Suggestion:
I would love to see LCD screens in this script. How cool would it bee when you press the Call button on floor 3 and an LCD on floor 3 says „Elevator Called“.
Also an LCD screen in the Elevator Cart which tells you on which floor the elevator is moving now and on which floor it is curently would be realy nice.
Danny 31 Oct, 2021 @ 12:49pm 
This is exactly what I needed. Thanks. Recommend adding another step in the directions that in order to call the elevator to a specific floor, you need to run the script with the floor number as the argument. Maybe obvious to most, but took me a few minutes to figure that out.
mhwyoshi 27 Sep, 2021 @ 9:16am 
Wow this is almost exactly perfect for me! Quite literally the only thing that’s missing is actually just elevator music sound block playing the music for the elevator well it’s moving up and down
Pocket Full of Horses 1 Jul, 2021 @ 7:31am 
@Morpheus same here, guessing it has. Haven't been able to find an elevator script that works consistently unfortunately :(
Molten Carnage 9 Jul, 2020 @ 11:22pm 
Followed directions to the letter and it messed up the 4 floors, 2 pistons, elevator piston positions with arbitrary values leaving the elevator car in between floors for every floor saved. Retried with same results. Both pistons end up with identical arbitrary values. Velocity + or - has no effect. Is it possible Keen has changed the coding for pistons since this mod was created?
Odom1957 22 Jul, 2019 @ 5:13am 
When setting up your script currently, the floors are named in sequential order. If I add a floor in between two floors, there is no way to make it name that floor a specific number. It will automatically pick the next one in sequence.

For example: I had a shaft in which I had floor 10,9,8,7, and 1 done, but 2-6 were not. When I setup the elevator floors, the script chose floor numbers starting with 1, so it was difficult to remember what number went with which floor. If I were able to select the floor number I wanted the script to be set to for each floor, then the numbers would always match floor numbers.

This may not be possible, due to how the script works, but it is a little confusing to remember what numbers to set in the arguments for each floor.

On a different note...the script works flawlessly in my experience. I have never had any issues with it stopping exactly where I want it to stop.
aveBrian  [author] 11 Jun, 2019 @ 4:16pm 
@Odom1957 I'm always up for suggestions when adding features to these scripts.
I'm curious, what exactly do you suggest?
Odom1957 8 Jun, 2019 @ 9:31pm 
It would be nice if we were able to select our own floor numbers when adding floors, instead of the script selecting for us. I will have to redo everything each time I add floors, unless I want to name floors in random order. My sub level 10 is level 2 according to your script, and I have to name it that in the title, then every floor above that (Sub-9, Sub-8, etc) will not be named correctly until I put something at each floor and redo it all.
CaptPatrick01 13 Dec, 2018 @ 10:34am 
Yes, they were grouped. It took until the third attempt to get the elevator to set up and work correctly. Had to be VERY careful with the control panel.
aveBrian  [author] 13 Dec, 2018 @ 6:55am 
@CaptPatrick01 So, what it sounds like is happening, is the script is trying to move the pistons to the saved distance but since you accidentally reversed the velocity, they were never going to get there. The script wont release control of the pistons until the desired floor is reached. Strange though, once you issue a new command for a different floor, this should take care of that problem. I'll be on the road until Feburary, so I won't have a chance to look at it until then. For now though, recompliling the script should fix this problem. Thanks for the feedback and I'm sorry your dealing with these difficulties. There are very few things more annoying than a script that won't work. I'll get to work debugging as soon as I get back home. I'm curious though, are you grouping all the pistons with the programmable block?