Jump to content

Add experience


Recommended Posts

To find the current game mode, check:

HighLogic.CurrentGame.Mode

If you have a ProtoCrewMember object representing the kerbal you're trying to give experience, try playing with the following properties:

ProtoCrewMember kerbal;
kerbal.experience;
kerbal.experienceLevel;
kerbal.experienceLevelDelta; // READ-ONLY

Note that the last one is read-only -- I believe it gives you how much experience is needed to reach the next level.

If you don't have the ProtoCrewMember, you'll have to find one. Here are some ways you can get kerbals:


HighLogic.CurrentGame.CrewRoster.Crew; // Entire crew, including killed kerbals.
Part part;
Vessel vessel = part.vessel; // The vessel this part is a part of.
vessel.GetVesselCrew(); // Crew aboard this vessel

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