In-Game Programming - Who Is Flying The Grid?
I raised the question on Discord and did some research. There's no direct way of telling via the programmable block which IMyShipController block is associated with the current input of movement controls.
In the game, there are pop up messages to let a player know that they are not associated with controlling the grid because another player has those privileges.
We have a playerID associated with input to a grid. We also have that playerID as occupying a specific block. So a method that returned a bool of HasControl associated with IMyShipController so cockpits and remotes can be covered.
Something like IMyShipController _variable; _variable.HasControl returning a bool of true or false. If control of the grid is recalculated when someone gives up control, then it's refactored.
This would be helpful for scripts that react to flight control input as developers debugging and observing the behavior of multiple players entering exiting cockpits and turning on and off "Main Cockpit" and other flight controls.
Replies have been locked on this page!