Jump to content

landetAt[] usage?


Recommended Posts

  • 1 month later...

That should be a string value actually (which, admittedly, is a char[]). It will be an empty string when you\'re landed on normal terrain, but it will have a few values on specific situations:

If you\'re landed near KSC, it will read 'KSC'.

If you\'re landed at the runway, it will read 'Runway'.

and if you\'re landed at the launchpad, it will read 'Launchpad'.

That value is used by persistence mostly, and gets saved in the SFS file as well. It\'s mostly used to detect the launchpad and runway being obstructed, and also to clear debris off the area around the space center.

Cheers

Link to comment
Share on other sites

That should be a string value actually (which, admittedly, is a char[]). It will be an empty string when you\'re landed on normal terrain, but it will have a few values on specific situations:

If you\'re landed near KSC, it will read 'KSC'.

If you\'re landed at the runway, it will read 'Runway'.

and if you\'re landed at the launchpad, it will read 'Launchpad'.

That value is used by persistence mostly, and gets saved in the SFS file as well. It\'s mostly used to detect the launchpad and runway being obstructed, and also to clear debris off the area around the space center.

Cheers

Thanks for the info!

One question is left:

If I do


vessel.checkLanded();
GUILayout.Label(vessel.landedAt, mySty,GUILayout.ExpandWidth(true));

in my GUI Update to check the values, the label at launch first shows 'Launchpad' but goes blank when the physics engine kicks in.

Is this intended or am I doing something wrong?

Link to comment
Share on other sites

  • 3 weeks later...
Thanks for the info!

One question is left:

If I do


vessel.checkLanded();
GUILayout.Label(vessel.landedAt, mySty,GUILayout.ExpandWidth(true));

in my GUI Update to check the values, the label at launch first shows 'Launchpad' but goes blank when the physics engine kicks in.

Is this intended or am I doing something wrong?

That's probably correct. LandedAt will be blank unless you're landed at the launchpad, runway, or the area around KSC. Otherwise it is "".

And you shouldn't be calling checkLanded on OnGUI really. That might cause trouble, since OnGUI doesn't run during physics update. Landing detection is done automatically, and the values should update themselves.

Cheers

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