Space Engineers

Space Engineers

SE Macros
48 Comments
🍁BuzzedBear🍁 17 Sep, 2022 @ 10:57am 
Not sure if I just missed it, but is there a command to change the color of lights, whether it be individual lights or by group?
Siv 9 Aug, 2022 @ 10:15pm 
This is a really great idea and the implementation is pretty great. I love the full words for most commands. Makes it much easier to remember.

I'm wondering if you could add full word aliases for tests and parameters, so instead of:

(Rotor?A<15)Rotor:V=1;Spotlight *:Color=255,0,0

One could write:

(Rotor?Angle<15)Rotor:Velocity=1;Spotlight *:Color=255,0,0

Regardless, this is excellent work. Thank you.
Cruel Sun  [author] 31 May, 2021 @ 5:07am 
Fixed TextFrom error (reported by Shadowpheonix)
Cruel Sun  [author] 29 May, 2021 @ 10:01am 
Juroguy Johnson
it's not a mod - it's a ingamescript - search it in PB
Cruel Sun  [author] 29 May, 2021 @ 10:00am 
The_liminator 30
can we have a command just to simply reverse the rotor (and hinge,pistons...)
There is present V=R
Cruel Sun  [author] 29 May, 2021 @ 9:57am 
cy-one, you can write comments in a new line like this
Now we turning on all lights
*Light*:On

or this like
*Light*:On; Now we turning on all lights

wrong "directives" will be ignored
Juroguy Johnson 22 May, 2021 @ 5:53pm 
I cant see this in the modlist is that normal?
Cheezy Proot :3 30 Mar, 2021 @ 8:16am 
oh wait the script already have one
Cheezy Proot :3 30 Mar, 2021 @ 8:14am 
can we have a command just to simply reverse the rotor (and hinge,pistons...)
cy-one 5 Jan, 2021 @ 7:55am 
Could we get a "key" to declare comments? Especially on the same line as a command (like "lights:On // turns the lights on you fool!")
Shadowpheonix 30 Nov, 2020 @ 8:53pm 
I just started trying to play with the camera raycasting, and I cannot seem to get it to work. For my testing, I am using...
(Camera1?Distance>100)Spotlight:Color=0,255,0
(Camera1?Distance<100)Spotlight:Color=255,0,0
Repeat

No matter how far I am from an object, this results in my spotlight always showing green.
I tried to debug it by adding the following line at the beginning...
LCD1:TextFrom=Camera1

That results in an "object reference not set to an instance of an object" error.
Shadowpheonix 18 Sep, 2020 @ 12:43pm 
Is there a way to make the various ArrangeTo commands rotate faster? Adding more gyros to the grid seems to have no effect when SE Macros controls the movement.
AVES7A 15 Aug, 2020 @ 8:52am 
Run command doesnt work as intended if your parameter for argument has parentheses ()
please make it work if you had time, because there are lots of abilities i can do with running my other programming block
nixikitsune 17 Jan, 2020 @ 7:44am 
Is it possible to add a function to detect the position of the piston?
I'm working on a macro that uses a piston to detect a sensor and run Macro. I want to run when the piston moves.
Gonzi[RUS] 13 Jan, 2020 @ 12:06am 
Yeah, i have a same problem with pistons
Viesuliss 6 Jan, 2020 @ 8:29am 
Im still looking into this thread to see if anyone has a way to solve my issue. Thank you!
Mavors 25 Dec, 2019 @ 1:06am 
Hello HellArea
Same problem as Viesuliss ...
I would need to trigger a movement of 2 pistons alternately at certain positions of the same, unfortunately I can't find the syntax of the "condition" of the pistons.
At the moment I have solved via "delay" but it is not the exact way.
Please forgive my English and ignorance of C programming.
Some advice?
Thank you
Viesuliss 18 Dec, 2019 @ 6:25pm 
Hello! Is there a way to read piston position? I tried all sorts of lines like there (VIESEN-Drill-Piston?D>9) VIESEN-Drill-Piston:Off . None of them seemed to react to current piston distance
Gromit 3 Dec, 2019 @ 1:47am 
Hi HellArea, thanks a lot for this script, really useful. Do you plan to add an option to setup an image on an LCD ? I found options to setup text but no one to load and display an image. Thanks
Sp00kyAngel 1 Dec, 2019 @ 5:34pm 
Thank you very much HellArea I appreciate your work!
Cruel Sun  [author] 1 Dec, 2019 @ 9:53am 
OrpheYEA added missing blocks info
Cruel Sun  [author] 1 Dec, 2019 @ 9:45am 
Ded Banzay Так а чем IMyLargeTurretBase плох?
по рейкастам итак есть куча возможных ограничений, которые можно указать на сервере, если просто сжигает, это больше вопрос к администрации
Ded Banzay 29 Nov, 2019 @ 11:01pm 
Ох Вашими устами....)
сервер может залочить весь крипт( итолку будет ноль) или спалить прог. блок...
Короче будет беда-печаль'(
К стати, в курсе что у турелек универсальное название существует? ;)
Sp00kyAngel 29 Nov, 2019 @ 10:48pm 
Thank you for your response. Now that I think about it "Expected x character here" may be a bad example that would not be relevant to your script. Sorry for the confusion.
Cruel Sun  [author] 29 Nov, 2019 @ 5:25pm 
To Ded Banzay
Raycast позволяет получать на панели информацию. Если он запрещен, то просто не будет работать
Cruel Sun  [author] 29 Nov, 2019 @ 5:24pm 
To OrpheYEA
- "No block found by that name" - Ok
- "Expected x character here" - I don't get it
- Does ArrangeToPlanet only work in a gravity field? - yes
- for gyros and ArrangeToStop I'll add some video
Ded Banzay 20 Nov, 2019 @ 3:27am 
а что в нем делает - raycast?
иногда он запрещен на серверах в любом виде. с соответствующими последствиями для скрипта.
Sp00kyAngel 20 Nov, 2019 @ 2:05am 
Also if anybody knows of a script that allows me to control gyros to rotate a script by x degrees instead of setting override values that would be very useful.
Sp00kyAngel 20 Nov, 2019 @ 2:03am 
The gyroscope values also do not seem to work correctly for me. I can not set specific overrides for gyroscopes. If I spam the same command it seems to eventually change the value to something but not the value I asked for. How exactly does it work? If I pass Gyro:Value=1,1,1 is it set to 60RPM or 1RPM? I did some further experimenting with ArrangeToStop and it seems that it will start arranging the ship but then immediately parses the stop command following it and does not finish arranging before it reads the next line. So I tried running ArrangeToStop in a separate macro programmable block by itself and I had it Repeat itself. When I did that, it would continue to move very slowly endlessly, even after my dampeners had reduced my velocity to 0. It did not seem to move quick enough to help me stop any faster than dampeners in every direction would, nor did it cease moving when I had no velocity (maybe I should add a condition checking for speed?)
Sp00kyAngel 20 Nov, 2019 @ 1:21am 
I also do not know how to get the Arrange commands to work correctly. ArrangeTo GPS works. However, ArrangeToStop or ArrangeToPlanet seem to do nothing at all. Does ArrangeToPlanet only work in a gravity field? The guide doesn't explicitly say so I am not sure if it is a syntax error on my part or I'm misunderstanding in what situations I can use the command.
Sp00kyAngel 18 Nov, 2019 @ 10:03pm 
Is there any way you can add some sort of syntax errors to the details of the programmable block running SE Macros? I often have a hard time figuring out where my mistake is in the code I write. It would be nice if instead of doing absolutely nothing the programmable block put something in its details explaining where the syntax error is. For example "No block found by that name" or "Expected x character here" etc. I hope you understand what I mean. Love your script so far. You can do some very cool things with it.
Ornament 13 Oct, 2019 @ 2:40pm 
Thanks for the timer blocks :)
Ornament 13 Oct, 2019 @ 2:39pm 
the last part?
if i add the script to a programmable block, the programmable block renames itself to "••macro". If I want to run multiple blocks with macros it's really hard to distinguish between them, without modifying the source code itself.

A way to avoid it wouid be to not rename it or add a command to rename the programmable block itself.
Ornament 12 Oct, 2019 @ 4:16pm 
I absolutely love your mod. Although I am able to program C# stuff, it's just much easier to quickly setup a macro.

Could you add a command to trigger a timer block? :)
This would open up possibilities to do stuff which isn't included.
I was trying to change the "share inertia" setting of a rotor.

And if I am already doing suggestion, a custom data value to change the block name of the programmable block itself, so it's not neccessary to change it in the code :)
Cruel Sun  [author] 28 Sep, 2019 @ 12:19pm 
Hi TramVai,
I was added a new command, for ex. TextPanelOne:TextFrom=TextPanel Two will duplicate the content. TextPanelOne:TextFrom=Piston writes Piston: 2.7m / 0.5 m/s ...
TramVai 10 Aug, 2019 @ 1:48pm 
Hi Gabriella,
Your script is absolutely amazing, great job! I made an automated drilling truck with a foldable drill arm with just a little bit of coding. I wonder if there is a way to read current piston position? Like when its fully extended, fold drilling arm and remove parking brake for a delay, put brake back on, unfold arm and start drilling in a new spot. Also is there a way to read block info (like Rotor angle) and write it on LCD, like LCD:Text=Angle is ;LCD:TextAdd=[Rotor:A] . Thanks a bunch!
Cruel Sun  [author] 14 Jul, 2019 @ 12:01pm 
Is updated, a little video added to the manual
ranus_magnus 14 Jul, 2019 @ 5:37am 
Yes, i habe the bad habit to still go on mining while my containers are allready full.
It's a big waste.
Cruel Sun  [author] 14 Jul, 2019 @ 3:35am 
@ranus_magnus Nice idea! I will do it today =)
ranus_magnus 14 Jul, 2019 @ 12:53am 
Hi.
This looks amazing!
Is there any way to get info about the status of a Cargo Container?
Like in "it is 90% full, switch on that light".
Cruel Sun  [author] 3 Jul, 2019 @ 4:33am 
Hi, in my previous example (with Step Uno, Due...) you can bind like
Key 1 > #Step Uno
Key 2 > ...
woostyboy 3 Jul, 2019 @ 3:50am 
OK, so I'm not any good an programming, but I think I get this.... So you can have this script in a PB, then run that PB with argument (for example) 'Spotlight *:On' and bind it to your 1-9 buttons?
Cruel Sun  [author] 7 Jun, 2019 @ 4:38pm 
@eezaz, script can manage this itself, but anyway, if you want to run from a timer - add Run with default value or use #MyAnyLine
Script
Step Uno
[your commands]
stop

Step Due
[your commands]
stop

Step Tre
[your commands]
stop

And use #Step Due

At now, if I wanted to increment the upper limit slowly, for example, any 15 seconds (10 steps will took 150 sec.)
TickRatio 90
Piston:MaxU=1
Piston:MaxU=2
Piston:MaxU=3
...
Piston:MaxU=10

or just in one line Piston:V=0.067
(where 10m/150sec)
eezaz 7 Jun, 2019 @ 4:00pm 
Is it possible to run these commands through a timer block? Like if I want to set minimum distance of a piston to 10 in a timer block, I have to do it in increments of 0.5.
Hyper 6 Jun, 2019 @ 9:43am 
This is incredible, this removes the need for so many separate and simple scripts, thank you.
SENTINELS 5 Jun, 2019 @ 4:42pm 
Took a few trials but ended up merging 9 timer blocks into this.
RagingDanger 4 Jun, 2019 @ 7:40am 
Yo if skallabjorn says this is promising then this should get alot of attention
Skallabjorn 2 Jun, 2019 @ 10:02am 
this looks promising :)