Space Engineers

Space Engineers

Share Your Creations
Find and download player-created worlds and mods, or create your own and upload them directly to Steam Workshop.
Learn More
Ewe Loon 3 4 May, 2024 @ 1:48pm
Storing Block Data
Can anyone point me to a tutorial on how to store block data for custom blocks
< >
Showing 1-3 of 3 comments
ShadedMJ 3 4 May, 2024 @ 6:51pm 
Every terminal block has a "Custom Data" field that you can use to store data. This is how a lot of the inventory managers work.

It depends on what the custom block is doing.
Ewe Loon 3 4 May, 2024 @ 7:06pm 
"Custom Data" is used for player scripts (progtamable blocks) to use not for the blocks internal use for example the position of a piston
ShadedMJ 3 4 May, 2024 @ 7:46pm 
Would have been nice to state that example up front.

I write programmable block scripts. Every block type has a set of variables attached to it.

Script wise and to go with your example : Piston.CurrentPosition is its current position and is a floating point number. The actual offset of that information might match what is in the interface reference but I doubt it.
< >
Showing 1-3 of 3 comments
Per page: 1530 50