Space Engineers

Space Engineers

(Old) Easy Automation (InGameScript)
Coren  [开发者] 2015 年 12 月 1 日 上午 12:23
Questions on use
Post your questions here.
< >
正在显示第 1 - 15 条,共 145 条留言
artiedee 2015 年 12 月 4 日 上午 2:44 
So what is the benefit of using this script compared to having timer blocks? Will we be able to finally make mechs that walk a bit faster?

Its totally awesome script by the way.
Coren  [开发者] 2015 年 12 月 4 日 上午 8:50 
With timer blocks you can indicate that you want to wait for 1 second or 2 seconds or 3 seconds and so on before the timer block triggers. but with this script you can wait for 1.5 seconds or .01 seconds or any other finite amount of time. Also you can set the sliders to exactly the number you want instead of having to rely on the default incrementation that "Increase so and so" gives you. So yes, you can make mecs that move faster and more accurately as well as many other types of automation that require a much more refined sense of time and position. Also it will allow you to do this without needing an entire room full of timer blocks. Also it allows you to check the position or status of a block and then do something according to what it finds. Example: it sees that the piston's Current position just passed 1 meter, this triggers the light to turn on. check out the video tutorials and you'll get a better idea.
Darth Biomech 2015 年 12 月 4 日 上午 9:00 
Don't quite understand if "if" can work as a switch. Like for instance in programming it is typically:

if [condition] = [value] {
then
{
[do some things]
}
else
{
[do some different things]
}
}

but in your tutorial video for the "if" the formatting is just

if [condition] = [value]
[do some things]

Coren  [开发者] 2015 年 12 月 4 日 下午 6:33 
@Darth Biomech@ it can by putting Skip at the end of each if statement.

if[condition] = [value] <-- if this is true it will run and skip everything else in the current block
[do some things]
Skip

if[condition] = [value] <-- this will be skiped if the previous [condition] was true
[do some things]
Skip

[do some things] <-- this will be skiped if the any of the [condition] was true

if the contition is true then it will run to the end of the if statement then skip the rest of the code block and return to the code block that refferenced it. Skip is detailed in tutorial 5 along with End.
Darth Biomech 2015 年 12 月 5 日 下午 4:02 
Oh, I see, thanks. Then another one - can it work with groups? I think that would be handy in managing lights.
Coren  [开发者] 2015 年 12 月 5 日 下午 4:40 
I didn't add groups due to their unstable nature in the game. I have had groups disappear on me when merging and such. It can affect things with similar names though. Lets say you have 5 lights named:

Bright Light01
Bright Light02
Dim Light01
Dim Light02
Bright Dim Light01

then
"OnOff Light" will toggle All Lights

"OnOff Light01" will toggle Bright Light01, Dim Light01 and Bright Dim Light01

"OnOff Bright Light" will toggle Bright Light01 and Bright Light02

"OnOff Bright" will toggle Bright Light01, Bright Light02 and Bright Dim Light01

"OnOff Dim Light" will toggle Dim Light01 and Dim Light02

In this fashion you can have "groups" with common names, there is no risk that a future update will mess with the groups you make, and it also encourages good naming habits so that you don't end up with a bunch of generically named blocks that can easily be confused.
最后由 Coren 编辑于; 2015 年 12 月 5 日 下午 4:58
Darth Biomech 2015 年 12 月 5 日 下午 5:17 
Yeah, but when you have like 300 lights on a ship, I tend to just mark start and end of their section and then group them into general room named group. Maybe just add prefix, like # for example, to indicate script that it is name of a group instead of name of a block? Warn people that using groups is potentially unstable and that'll be all. I never had ANY issues with groups TBH.


Okay so how do I read "Room pressure" of an airvent for an "If"? I wrote

If Room pressure of L_Airlock_Vent < 1

but nothing happening
Purpleskin 2015 年 12 月 5 日 下午 5:24 
Is it possible to hold a rotor at an angle using torsion? Limits set -10 and 10, kinda like a seesaw?
Coren  [开发者] 2015 年 12 月 5 日 下午 5:41 
@Darth Biomech
Room pressure of L_Airlock_Vent < 1%
should work, don’t forget to add the unit indicator "%" when using a detailed info check.
Let me know if this does not do it, I am not so sure about this one because it changes to text when it is at 0% so you might run into some problems.
Darth Biomech 2015 年 12 月 5 日 下午 5:45 
It gave me "caught exception during execution of script: index was outside the bounds of array"


If this is fails, then how do I check for open or closed door? Open, Open_On or Open_Off?
最后由 Darth Biomech 编辑于; 2015 年 12 月 5 日 下午 5:47
Coren  [开发者] 2015 年 12 月 5 日 下午 5:51 
@Purpleskin yes

with the limets set to 170 and 190

@Seesaw{
if Current angle of rotor < 180d
Velocity of rotor = 10

if Current angle of rotor > 180d
Velocity of rotor = -10

if Current angle of rotor = 180d
Velocity of rotor = 0
}

this might do it? Play around with this and see what you come up with :)
Coren  [开发者] 2015 年 12 月 5 日 下午 5:55 
@Darth Biomech

if Open of door = true
this will check if the door is open
Coren  [开发者] 2015 年 12 月 5 日 下午 6:22 
@Darth Biomech I just fixed the problem with the Room pressure. The new version should work now.
Darth Biomech 2015 年 12 月 5 日 下午 6:35 
Yeah, that works, thanks)
Coren  [开发者] 2015 年 12 月 5 日 下午 7:42 
ok, It actualy didn't work, it was only half fixed. NOW it is compleatly functional, even when there is no pressure.
< >
正在显示第 1 - 15 条,共 145 条留言
每页显示数: 1530 50