Space Engineers

Space Engineers

(Old) Easy Automation (InGameScript)
Coren  [developer] 1 Dec, 2015 @ 12:23am
Questions on use
Post your questions here.
< >
Showing 1-15 of 145 comments
artiedee 4 Dec, 2015 @ 2:44am 
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  [developer] 4 Dec, 2015 @ 8:50am 
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 4 Dec, 2015 @ 9:00am 
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  [developer] 4 Dec, 2015 @ 6:33pm 
@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 5 Dec, 2015 @ 4:02pm 
Oh, I see, thanks. Then another one - can it work with groups? I think that would be handy in managing lights.
Coren  [developer] 5 Dec, 2015 @ 4:40pm 
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.
Last edited by Coren; 5 Dec, 2015 @ 4:58pm
Darth Biomech 5 Dec, 2015 @ 5:17pm 
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 5 Dec, 2015 @ 5:24pm 
Is it possible to hold a rotor at an angle using torsion? Limits set -10 and 10, kinda like a seesaw?
Coren  [developer] 5 Dec, 2015 @ 5:41pm 
@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 5 Dec, 2015 @ 5:45pm 
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?
Last edited by Darth Biomech; 5 Dec, 2015 @ 5:47pm
Coren  [developer] 5 Dec, 2015 @ 5:51pm 
@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  [developer] 5 Dec, 2015 @ 5:55pm 
@Darth Biomech

if Open of door = true
this will check if the door is open
Coren  [developer] 5 Dec, 2015 @ 6:22pm 
@Darth Biomech I just fixed the problem with the Room pressure. The new version should work now.
Darth Biomech 5 Dec, 2015 @ 6:35pm 
Yeah, that works, thanks)
Coren  [developer] 5 Dec, 2015 @ 7:42pm 
ok, It actualy didn't work, it was only half fixed. NOW it is compleatly functional, even when there is no pressure.
< >
Showing 1-15 of 145 comments
Per page: 1530 50