Space Engineers

Space Engineers

View Stats:
Scripting and the ejector
Hey all,

I am building a mining ship and have an ejector on the back.

What I would like to do is write a script that will automatically eject stone out the back as I'm going.

I have enough scripting knowledge to understand the basics, I can write a script that moves items from one inventory to another, I just dont know what I'll need to do to get it to eject the stone.

Any suggestions would be awesome! :)

Thanks!
< >
Showing 1-9 of 9 comments
krzosu18 Nov 24, 2015 @ 2:36pm 
there is no need to scipt it - just use sorter + connector - set sorter to whitelist rock and connector to grab all and to throw out - it works very well

http://steamcommunity.com/sharedfiles/filedetails/?id=561911479

i mine with the ship and its auto expelling rock into space without any input - if for whatever reason i would need stone - just turn of the sorter :)

dont get me wrong scripting would be a way to go if sorter block wasnt present but sorter kinda solves it on the spot :) Cheers
Last edited by krzosu18; Nov 24, 2015 @ 2:43pm
Slab Squatthrust Nov 24, 2015 @ 2:57pm 
Ok, I think I need a crash course in how exactly it decides to move things around.

I have several cargos in a row and all sorts of conveyers. At the end of a mining session, there is ore in each of them. How does it decide where it's shipping stuff?

Just because I have a sorting attatched to a conveyer and an ejector with stone whitelisted, does that mean it will automatically ship it out that way? Or does it have to go with the flow so to speak?
TinfoilChef Nov 24, 2015 @ 3:25pm 
I can't speak to the inner workings of conveyors & such however I've used the sorter-connector combination to eject stone in this ship http://steamcommunity.com/sharedfiles/filedetails/?id=543700401

There's 4 sorters, each connected to a connector at the aft end of the ship, When I turn the connectors on they automatically pull stone from any inventory on the ship and eject it.
krzosu18 Nov 24, 2015 @ 4:48pm 
basically if all your inventories are linked via cargo doors/conveyors then they form a network - this means that you can connect sorter to anywhere you can attach its cargo door and it will browse through all those linked inventories. sorter can work in 2 settings - whitelist (aka only those items can pass through it) and black list aka all can go except those listed - so if you place the sorter then whitelist stone/rock then only it will be able to pass (which we want ) cuz the next element aka connector should be set to grab all - and to throw out - which means it will send pull command to fill its inventory and since only rock can pass through sorter it will pull only rock from all linked (via doors/convs) cargo containers and then expell it to space.
Last edited by krzosu18; Nov 24, 2015 @ 4:50pm
Modi Nov 24, 2015 @ 5:02pm 
If you set a sorter to drain all you can forego the connector and just use an ejector, just make sure the sorter is set to whitelist stone before you start
Slab Squatthrust Nov 25, 2015 @ 8:44am 
Thanks guys! I have it working but I wish it would eject faster.

Is there a built in flow rate for small tubes? Can I increase the rate at which it ejects by using large sorters or by running more small tubes back from the drills or cargo?
n00bdragon Nov 25, 2015 @ 8:47am 
Each ejector can only dispel one item at a time at a fixed rate. To increase the flow add more ejectors. Usually I set up a closed network of ejectors on the back of my mining ships all hooked to one sorter.
Slab Squatthrust Nov 25, 2015 @ 8:49am 
I have 4 ejectors going but it doesn't even come close to keeping up with the intake of stone.
Voice From Beyond Nov 25, 2015 @ 4:21pm 
Well all that stone has to go somewhere. You just have to add more ejectors (small ship only) or try connectors (small and large ship) or mine slower.
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Nov 24, 2015 @ 2:33pm
Posts: 9