Jump to content

[Solved] How can I detect if a Kerbal is clambering?


Recommended Posts

I'm trying to find a way to detect if a Kerbal is in the act of clambering/climbing over/up something at a particular instant.

I found the KerbalEVA module easily enough and that lets me detect if they are holding on to a ladder or rag-dolling. It also has a number of methods and properties related grabbing and clambering but I can't seem to find a way to use any of them to detect an in-progress clamber.

Does anyone know how this can be done or point me in the direction of other classes/properties that could be useful?

Edited by Aelfhe1m
mark as solved
Link to comment
Share on other sites

On 5/24/2016 at 4:03 AM, JPLRepo said:

have you looked at kerbalEVA.fsm.CurrentState and CurrentStateName to get the FSM state machine state?

Thanks that was the missing piece of the puzzle:

var kerbal = FlightGlobals.ActiveVessel.evaController;
if (kerbal.fsm.currentStateName.StartsWith("Clamber")) {
 // something
}

 

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...