Jump to content

[Answered] Action Groups and Vessel.IsCommandable/IsControllable


Recommended Posts

Answer: Alright, it looks pretty straightforward.

.IsCommandable is simply a check if it's a vessel or not, so this should be false for debris and true for pretty much everything else. (By command part as per Boris's post below.)

.IsControllable appears to be what I'm looking for and checks if there is a Kerbal in control, or a probe core with electricity present.

This is just from tests on the launch pad though, I may have missed an edge case somewhere.

 

Alright.

I've recently realized my AGX mod bypasses the control lockout that is supposed to prevent you from commanding a vessel when it does not have a Kerbal or a Probe Core on board.

Looking at how I can add this lockout to match the expected behavior, it looks like either the Vessel.IsCommandable or Vessel.IsControllable is what I need to look at, but what's the difference?

Or should I be looking somewhere else to see if I should allow action groups to execute or not?

Note that this is only on the player's keyboard input, other mods will not be subject to this so something like Smart Parts altitude sensor triggering a parachute on a discarded booster stage will still work.

D.

Edited by Diazo
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...