Space Engineers

Space Engineers

评价数不足
Piston GoTo Position
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
359.207 KB
2015 年 1 月 1 日 下午 10:03
1 项改动说明 ( 查看 )

订阅以下载
Piston GoTo Position

描述
This is my first program for Space Engineers. This code will move a piston to a hardcoded position. Using multiple code blocks you can easily toggle a piston between multiple different positions, for instance like an elevator with multiple floors. Its probably more complex than it needs to be but it gets the job done.
10 条留言
Crashoverride 2018 年 8 月 22 日 下午 2:46 
Latest build of SE crashes when this script is complied.
The Erubian Warlord 2015 年 3 月 31 日 上午 7:18 
put the sensor on the lift platform to open doors
Deathpaw 2015 年 3 月 29 日 上午 9:58 
@ ESS. I have a sugestion. Try a set of Timer and sensors that detects player. Close all the doors when the lift starts and then open the door with the tripped sensor triggered after a max waited time from ground to top. It's not perfect but could work. Alternativey if you can code very basic triggers, either into a seperate Prog Block or into this one.
PanzerMarmerlade 2015 年 3 月 26 日 下午 11:29 
Im using it like that. The problem is that the door opens without the elevator being in the corresponding floor. since the elevator is moving from length 15m to 70m and the maximum speed that works without getting everything destoyed is 1m/s. You would say I can set a second timer that opens the door with delay but you never know if the elevator has to move 55 or 10 meters. (from the 1st to 0 floor or from 4th to 0.
Alluceanot  [作者] 2015 年 3 月 22 日 上午 9:02 
@Sarantis
I haven't looked at this program in a while and its probably outdated at this point; however, you should be able to get the functionality you want by tying each button in your elevator to a timer block that runs the piston script and also opens or closes the appropriate doors.
PanzerMarmerlade 2015 年 3 月 19 日 上午 5:56 
I use your script for a double long piston elevator (max length 70 meters. It's working great with four floors and with the addition of an elevator cabin with four buttons. One simple request. Can you add in the code a command that when the piston reaches the specific length it can open a door? For example when the joinlength is 20 open door "Floor1door" when it leaves from that length to close it. So you can have a simple calling button in each floor but the elevator door remains closed when the cabin is not in that floor.
Coastal Grandmother 2015 年 1 月 8 日 上午 9:04 
@Alluceanot Thanks - much appreciated
Alluceanot  [作者] 2015 年 1 月 7 日 下午 5:48 
The position is determined by the variable GotoZ. Its a double floating number but because of the way the pistons work you can only use increments of .5
DeAnti 2015 年 1 月 6 日 下午 8:32 
yea an example please
Coastal Grandmother 2015 年 1 月 3 日 上午 4:10 
@Alluceanot This is good but please could you give an example of how to set where the piston position(s) in the programming?