Space Engineers

Space Engineers

Elevator Piston Control
31 条留言
03dfa 2024 年 9 月 18 日 上午 1:20 
is it possible to control multiple elevator on one grid?
morpheusfd 2023 年 7 月 25 日 下午 1:18 
I don't understand how to fix error "System.OutOfRangeException: index was out of range (etc.).
It come when I record Floor.
Is this because I ave two elevator in the same grid ?
(but I name group piston with 1 and 2 number)
DFPercush  [作者] 2022 年 9 月 28 日 下午 11:31 
This script only controls a single elevator. There's no limit on the number of floors though.
糖酱今天又在摆烂 2022 年 9 月 21 日 上午 6:36 
Can I control multiple groups of elevators simultaneously?
Overclock 2022 年 7 月 6 日 上午 7:03 
is there an upper limit to how many floors it can go to?
pixoe 2022 年 3 月 20 日 下午 2:26 
I keep getting this error

System.NullReferenceException:
Object reference not set to an
instance of an object
at Program.Ding(StringdroupName, String Suffix, String floorName, String action, list'1doorWaitList0
at Program.Main(String argument, UpdateTypeupdateSource)

no idea what to do
TheBlueChocolate 2022 年 1 月 25 日 下午 12:39 
BikeGoddess:
-Pistons must be in the elevator piston group
-To save a floor, set the pistons at your floor height, then run the programmable block with the argument to save a floor with the floor name right after the argument (I don't remember the argument) (Example: <theargument> [floor1])
-To go to a floor, run the PB with your floor name, no argument required other than the floor name.
BikeGoddess 2022 年 1 月 24 日 下午 5:14 
I'm confused, I've used this in past but its not making sense now. how do I get this to go to a specific floor?
TheBlueChocolate 2021 年 8 月 7 日 下午 2:09 
Yep, the hangar doors now works.
The timer bug is still there tho.

I named my "common" arrival timer block "Timer Block (elevator)". However I tried something : when I add all floors names to the "common" timer block's name, it work with every floors and open the floor doors when you arrive (It's not ideal but at least it work)

It seems the script is able to open the doors only if it detect the floor tag in any timer block's name. (even if the timer block is toggled off and have no action setup), and have trouble finding the "common" timer block if there is no floor tag.

Having a single timer block is still better than having one timer block per floor (or 2 before today's update when using hangar doors)

Thinking about it, the only suggestions I have now are not really usefull or could be achieved in other ways.
DFPercush  [作者] 2021 年 8 月 7 日 上午 8:55 
Ok, should be able to use hangar doors now. No timers required if that's all you need.

About the timers though, you should be able to have a common arrival timer. It's designed to look for a separate one for each floor, but if you just have a group with one timer in it, it will search by proximity and find the only one there is. *Unless*, possibly, you name your floor "2" and your timer is "Timer 2" . Personally, I use "1F", "2F" etc. Otherwise it might be good idea to take the numbers out of the timer name, unless that's actually what floor they go on.

Anyway let me know how it goes.
DFPercush  [作者] 2021 年 8 月 6 日 上午 9:41 
@TheBlueChocolate Thanks for the feedback, that's very useful. I think I know why it's doing that, and it's not your fault lol. It was a quick and dirty hack, I actually didn't consider needing to trigger multiple blocks because my original strategy was just "use a timer". Anyway, I'll have a look at it over the weekend.
TheBlueChocolate 2021 年 7 月 30 日 上午 8:13 
The new LCD settings (and arrow) works, the doors automatically close and the elevator only move once the door is closed.

However, i found a few bugs with the new door mechanics.
While testing the new version, I found out that it will only open the door if there is a timer block set up with the floors names, even if the timer blocks has no action setup and are toggled off on arrival.

Also, if you have only one common arrival timer blocks, it seems to only work with the last floors, not the first floors.

In my mind, the purpose of having the elevator to only start once the doors are closed was to use it with hangar doors. However, it seems I can only use one door per floor. May be I havn't set it up properly.

Sorry to bring bad news :/

The new arrow display is nice tho.
DFPercush  [作者] 2021 年 7 月 29 日 下午 7:41 
@TheBlueChocolate At first I thought I couldn't do an arrow because the SE font doesn't support unicode characters, but it turns out that there's an arrow sprite already in the game. Hope you like green. Also door groups are a thing now.
TheBlueChocolate 2021 年 7 月 24 日 上午 4:18 
I tested the new version, it works, but a simple indication about the display woudn't hurt: the fact it has to be set to text and images. That's not a big deal for standard LCDs, but some people might think it doesn't work for Sci-Fi one-button terminal because of this.

All suggestion I would have now would be considered as polishing, and not a big deal (Examples: being able to auto open/close doors without the uses of timer block as well as moving the elevator once all the floor's doors are closed, better LCD display (example: arrow facing up when it goes up, floor name displayed in the midle top of the LCD)) I do not consider it mandatory.

Thanks for the update.
DFPercush  [作者] 2021 年 7 月 23 日 上午 7:09 
Ok guys, I finally added LCDs lol. There's also a "departure" timer block group now that you can use to close doors and other stuff. Also, I'm not sure if I ever did this before but opposite facing pistons should be ok now. Lemme know how it goes.
TheBlueChocolate 2021 年 7 月 7 日 下午 3:05 
I agree, It would be great to have an auto door opening and closing, as well as a way to see what's going on on LCD (or Sci-Fi one-button terminal)
Still, it's the best elevator script I found.
Jasper 2021 年 5 月 14 日 上午 8:34 
Really enjoying your script. Thanks for making it. I watched kanajashi videos on YT where he used it a lot.

I'm using timer blocks triggered by the script to open doors at each floor providing access to the elevator. Working on a good method to close the doors as the elevator leaves a floor. Is that something the script could trigger? Only other idea I have is to use sensors .
Hawkwar 2021 年 1 月 2 日 上午 6:02 
Awesome Script. Have an award!
DFPercush  [作者] 2020 年 7 月 7 日 上午 6:44 
@FleaBagJr If you look at the programmable block's console when it arrives at a floor, it should say "trigger by floor name..." or "trigger by proximity..." with the block it's calling. Which version does it say it's using, floor name or proximity? If you feel like posting a blueprint on the workshop I might be able to test it. Other ways it could happen, hmm, idk, does the name of that floor appear in other floor names? Is that the only timer block? If it's triggering by proximity maybe all the timers are clustered together and that one is always the closest no matter what floor it's on? Maybe the origin point of the platform subgrid is offset in some way... but that should only affect proximity mode. Interested to hear if you figure anything out.
FleaBagJr 2020 年 6 月 26 日 上午 3:02 
hey mate playing about with making a muti floor car park with this script, but when i put a floors name in a timer block and/or the suffix its calling upon that timer block at all floors. any ideas?
DFPercush  [作者] 2020 年 5 月 13 日 下午 2:55 
@BoogieMan Yeah I overlooked UpdateType.Script - it's there now.
BoogieMan 2020 年 5 月 4 日 上午 5:41 
DFPercush,

So, I got around the issue.
Instead of calling the BP hosting your script from my script, my script calls a timer block which calls your script.

My OCD is freaking out, but it works.

When next you update your script, please include this change so your script can be called directly from another script (if in fact that is the issue).

Thank you sir.
BoogieMan 2020 年 5 月 4 日 上午 4:52 
ISSUE EXPLAINED
I can execute the [Floor Name] command against the BP hosting your script from a button control to cause the elevator to move to the recorded floor.

I can execute the [Floor Name] command from the BP hosting your script itself.

However, when i run the following psydo code on a separate BP ...

var bp = GridTerminalSystem.GetPB(...);
var result = pb.TryRun([Floor Name]);

... the elevator does not move.

The result IS true.
I know bp IS a reference to the BP hosting your script.
I KNOW I own both blocks.

Should this work and I'm missing something?
Or does your code currently not handle the UpdateType.Script enum?
And if the latter, can you update your code to do so ... please?

BACKGROUND (If you care)
I REALLY love your script.
I am trying to run your script on one BP and have a second 'Controller' BP control a menu displayed on an LCD and the position of the elevator by calling your script when a menu item (the floor) is selected.


Thank you sir.
COMMANDBrawler 2020 年 5 月 2 日 下午 2:37 
the script gives me a warning: unkown option in custom data `lcdname`
Mister Plissken 2020 年 5 月 1 日 上午 9:41 
Would this work with a piston driven hangar blast door?
Bitfighter 2020 年 5 月 1 日 上午 3:58 
sorry for the late reply, i got it working again by setting the floor again, the ground floor was intact, the other two stopped working. for the lcd out put just the floor that where recorded.
DFPercush  [作者] 2020 年 4 月 20 日 下午 6:25 
@ninjafox Ok, I got it working to mix up and down facing pistons now. :) I kind of always wanted to, I was just trying to get the first version out as fast as possible. Hope you like it.
DFPercush  [作者] 2020 年 4 月 19 日 下午 2:36 
@Bitfighter You know what, it was probably all those config options at the top of the script getting reset back to default. You must have used some different names for your groups and changed it there. I'll have to make it use custom data instead. That's going to happen again next update but hopefully that will be the last time.
DFPercush  [作者] 2020 年 4 月 17 日 下午 5:49 
@Bitfighter Sorry you're having trouble with it. Does the the programmable block show any errors in the terminal? The floors are stored in the block's .Storage variable, and I don't know of a convenient way to examine that from the terminal, unfortunately. But inserting new code doesn't erase it, only if you break the block. Maybe the way it updates through the workshop messed with it, idk, I'll have to do some tests with that. Best I can suggest is to just record them again and see if it works. Let me know if you figure it out or if you see any error messages in the terminal.
There's no LCD options at the moment, but what information would you like to see? I'll consider it a feature request, along with the opposed pistons. I'll see about adding something to list out the floors.
Bitfighter 2020 年 4 月 15 日 上午 3:18 
after the update my elevator is not working anymore, also where are the floors stored and how can i output to a LCD?
ninjafox 2020 年 3 月 28 日 上午 2:37 
I've found that it's more space efficient to have a combination of extending end retracting pistons facing in opposite directions instead of using conveyor tubes down. I'd like if i could add these inverted pistons somehow and the script would know what to do with it

p p
p p
|| p
|| p
|| p
|| p
----
I hope this makes sense, there is one extended piston facing down connected to 3 facing up
When the extended one retracts and the retracted ones extend, it gives 40 meters of extension