TransWikia.com

How to pull the mass of a subgrid (or total mass of all connected grids) into a programmable block script?

Arqade Asked on June 9, 2021

Related to another question about how thrusters interact with subgrids, I’ve decided that this is an excuse to try learning C# Scripting for the Programmable Block (PB).

My plan is to have a pair of thrusters tasked to the PB, which will monitor the mass of the subgrids and set the thrust override for those two thrusters accordingly. This should roughly cancel out the variable mass of the drills as they go about their business. I figure I’ll also have it monitoring the drill mass and automatically turn off the drills when they’re full. (Why not, right?)

I’ve looked over the API information, but I’m new enough to this kind of coding that I’m not entirely sure what I’m even looking for, so I’m looking for a place to start:

What would the line of code be to take the mass of a subgrid(s) to assign it to a float variable?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP