Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

how to catch advaced rotor "Angle" value ?

$
0
0
hi,

I can get all other values but not "Angle" for rotor block.

var rotor = GridTerminalSystem.GetBlockWithName("Rotor_drill") as IMyMotorAdvancedStator;
float angle = rotor.GetValueFloat("Angle");

Object reference not set to an instance of object error.

float angle = rotor.GetValueFloat("Velocity"); - this and any other float variable work fine.

Is Angle disabled through script ingame ?

Dave

Viewing all articles
Browse latest Browse all 903

Trending Articles