For Space Engineers players, this guide will show you my script of the advanced automatic elevator control, let’s check it out.
AACES – Summary
This script can be used to create and manage complex but easy to setup elevators without the use of timers or sensors.
Link to script: Script
A single programmable block with this script can manage all the elevators on a grid including support for any grid size. This script is designed in such a way meaning that many of the steps needed in creating an elevator are done automatically (closing of doors, multi-floor management etc).
Individual elevator’s settings can be adjusted from within their configuration, you can adjust speed, door timings, elevator smoothness however you wish. You can even setup timers for when certain events happen like arrivals and departures making things such as elevator music and arrival dings possible.
How to Setup
A video setup example is available here and in the workshop previews: Link.
- Place a programmable block and load this script.
- Then place a door on the first floor, prefix the name of the door with [L1]. Note: The number in brackets represents what floor the door will be on. You can also place multiple doors per level.
- Now continue this by placing door’s at each level the elevator should stop at, it’s also important that you add the prefix to each door’s name, only this time, changing the number with the level of the appropriate floor. E.g. A door at level 4 should have the prefix [L4] in the name.
- Create your elevator cabin, place your pistons along the shaft axis. (Do not worry about the cab being flush with the level as you can adjust this later on).
- Once you are happy with your door and cab, you can now finally get it working, select each elevator block, (doors and pistons) and make a group, the group name needs to be formatted as such: [Elevator <Elevator Name>] where <Elevator Name> is a nickname decided by you, this can be anything. An example of a group name is: [Elevator PrimaryCargoElevator]. A nickname is needed as this is how you will refer to the elevator through commands.
- Then run the script with the argument “setup” to create the elevator. You will now have a functioning elevator! All you need to do now is setup commands and (optionally) reconfigure the settings of the elevator.
- An elevator requires a minimum of 2 floors to function, if there are less than 2 floors when you run the setup command, the elevator won’t work.
- If your elevator shaft is wider (based on the placement of the door’s) than it is taller, you may have to manually set the axis in the configuration. E.g. If a 2 floor elevator has a 2 block difference in height, and a 3+ difference in width/length, you will have to manually specify the axis. (Y will work in most cases with vertical elevators however you may need to try X or Z in case it doesn’t work).
- Do NOT use the minimum distance piston property to offset your elevator cab, it will not work on the other floors, instead use the dedicated offset property in the elevator config. (Have a look at the configuration section).
- I recommend that you do not include spaces in the elevator nickname, you can still do this, however, you will have to add quotes surrounding the name when setting up commands which can be inconvenient if you forget, this is explained in more detail later on.
By default, each elevator comes with a preloaded configuration, these default settings are optimised for the typical basic piston elevator to work out of the box. However, if you are building a more complex elevator, you may possibly need to modify the settings.
Luckily, this isn’t too hard, the configuration settings for each elevator are stored in the custom data box of the programmable block, opening it up will reveal a list of elevators with individual properties, you may be familiar with this type of config from other scripts.
Find the section in the custom data which contains the name of the elevator you want to modify the settings for, it will look something like: [AAECS – Elevator Name]. The list of fields below the section are all the settings for that elevator, simply modify the values which you want to change. The fields and their descriptions are available below:
Determines how the elevator will slowdown, default is “Linear”.
- Half – The elevator will half its speed when within the smoothing distance. Only recommended for slow moving elevators.
- Linear – The elevator will gradually slow down/speed up when arriving/departing.
- Sine – The elevator will rapidly accelerate and decelerate when arriving/departing to/from a floor.
Elevator Car Doors
This script also comes with a way of handling doors which are on the elevator cab itself, the elevator cab doors will open when arriving at a floor and close when departing from a floor. Meaning that realistic and mostly safe elevators can be created.
To add these doors to the elevator, place the doors on the cab and add a prefix to the name of the doors, like with the level doors. Only this time, changing the prefix to [Elevator] since the door is located on the cab.
After doing this, add the blocks into the elevator group then run the “setup” command to fetch the blocks when you are done.
If you need a door on the cab to not open on a certain level because for example, the floor door
is placed oppositely on that level as opposed to other levels, you can exclude doors from opening on certain floors.
Excluded levels are stored in the custom data for each door. Open up the custom data of the door and you should see [Exclude: ] if you already have a working elevator. If you don’t see it, just add it manually.
Now after Exclude: you can type the floor number which you want the door to ignore, type multiple as a list like this: 1, 2, 3, 4, 5.
This will mean that the door will only open on floors 2, 4 and 5 and will not open on floors 1, 3 and 6.
An example diagram has been included where each door on the elevator cabin has its custom data shown (in their own highlighted boxes):
This script comes with the ability to make realistic looking display signs you would find in a real elevator such as:
To create one of these signs, place any LCD panel and add the prefix [Elevator] at the start of the name, then add it into the elevator group and run the setup command. You will now have a fully functioning status display sign which can be placed anywhere!
Please note, the font has to be monospace as the symbols will not render if it is any other font, there isn’t much I can do about this sorry. I may look into using sprites instead at some point in the future but I am not deciding on anything yet.
In order to actually use the elevator, you will need to setup commands. Commands are taken in as arguments. Run the script with the command as the argument to execute the command.
Moves the elevator according to the set action, actions can be floor numbers (e.g. goto TestElevator 3) or keywords: top, bottom, up or down. These options can be seen below:
- up – Moves the elevator one floor above.
- down – Moves the elevator one floor below.
- top – Moves the elevator to the top floor.
- bottom – Moves the elevator to the bottom floor (Floor 1).
- Any Number – Moves the elevator to the specified number, IMPORTANT: Elevators start at 1.
The elevator name for these examples is “PrimaryCargoElevator”
This will move the elevator to the fourth floor.
This will move the elevator to the first floor.
This will move the elevator one floor up.
If the name of your elevator contains spaces (such as: Primary Cargo Elevator), you will need to surround the name of the elevator in quotes. E.g.
This will NOT work:
However this will:
This goes for all commands where you need to reference an elevator name.
Resets the elevator queue, if you want to make the elevator also move to the ground floor, add the switch ‘–groundfloor’
This will remove every call in the queue and set the target floor to the first floor.
This will remove every call in the queue but will keep the elevator at the current floor it is already at.
That’s all we are sharing today in Space Engineers Advanced Automatic Elevator Control Script Guide, if you have anything to add, please feel free to leave a comment below, you can also read the original article here, all the credits goes to the original author Viruz
- Space Engineers: Block Troubleshooting Guide
- Space Engineers – How to Find Ores (Updated)
- Space Engineers: How to Find Ores Post-Survival Update