KSP API
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Classes | Static Public Attributes | List of all members
GameEvents Class Reference

GameEvents are EventData or EventVoid methods called when certain conditions are met. More...

Classes

class  Contract
 Game events related to contract status changes; the contract in question is returned as EventData for most events More...
 
struct  ExplosionReaction
 Used by onPartExplode More...
 
struct  FromToAction< A, B >
 Two objects; of the same type in all stock uses. More...
 
struct  HostedFromToAction< A, B >
 Two potentially different object types; the From/To object (B) returns two values, generally the old and new. More...
 
struct  HostTargetAction< A, B >
 Two objects of the same or different type; used generally in a manner similar to FromToAction. More...
 
class  VesselSituation
 Game events related to vessel situation changes; mostly related to progress tracking. More...
 
struct  VesselSpawnInfo
 Used by onGUILaunchScreenSpawn More...
 

Static Public Attributes

static bool debugEvents
 
static EventData< VesselonActiveJointNeedUpdate
 Triggered when a vessel docks or attaches with the grappling device; fires twice, once for each vessel More...
 
static EventData< EventReportonCollision
 Triggered when two parts collide More...
 
static EventData< EventReportonCrash
 Triggered when a part or vessel crashes into the terrain More...
 
static EventData< EventReportonCrashSplashdown
 Triggered when a part crashes into the ocean More...
 
static EventData
< GameEvents.FromToAction
< Part, Part > > 
onCrewBoardVessel
 Triggered when an EVA Kerbal boards a vessel More...
 
static EventData< EventReportonCrewKilled
 Triggered whenever a Kerbal dies; either on EVA or in a crashing vessel More...
 
static EventData
< GameEvents.FromToAction
< Part, Part > > 
onCrewOnEva
 Triggered when a Kerbal goes on EVA More...
 
static EventData
< GameEvents.FromToAction
< CelestialBody, CelestialBody > > 
onDominantBodyChange
 Triggered when changing SOI; both objects return the new dominant CelestialBody More...
 
static EventData< ShipConstructonEditorShipModified
 Triggered when any part is added or removed from a vessel in the editor; also triggered when any tweakable settings are changed; also when undo is called More...
 
static EventData< VesselonFlagPlant
 When a flag is planted by an EVA Kerbal More...
 
static EventData< string > onFlagSelect
 Triggered when a flag is selected from the space center's flag pole More...
 
static EventVoid onFlightReady
 Triggered when a vessel is fully loaded More...
 
static EventData< Vector3donFloatingOriginShift
 Deprecated? More...
 
static EventData< double > OnFundsChanged
 When Funds level changes, returns total Funds amount More...
 
static EventVoid onGamePause
 When the game is paused More...
 
static EventData< GameScenesonGameSceneLoadRequested
 Triggered upon scene change requests; returns the target GameScene More...
 
static EventVoid OnGameSettingsApplied
 When Game Settings are applied in the main settings menu, or the in-game settings menu More...
 
static EventData< Game > onGameStateCreated
 When a game is first created or loaded; returns the Game object More...
 
static EventData< ConfigNodeonGameStateLoad
 Triggered on loading a game, returns the game's full ConfigNode from the persistent file More...
 
static EventData< ConfigNodeonGameStateSave
 Triggered on saving a game, returns the game's full ConfigNode from the persistent file More...
 
static EventData< Game > onGameStateSaved
 Triggered when a game is saved, returns the Game object; More...
 
static EventVoid onGameUnpause
 When the game is unpaused More...
 
static EventVoid onGUIApplicationLauncherDestroyed
 When the application launcher (toolbar) is closed More...
 
static EventVoid onGUIApplicationLauncherReady
 Called when the ApplicationLauncher toolbar is ready to have buttons added to it. More...
 
static EventVoid onGUIAstronautComplexDespawn
 When the astronaut complex window closes More...
 
static EventVoid onGUIAstronautComplexSpawn
 When the astronaut complex window opens; from the space center or editor More...
 
static EventVoid onGUILaunchScreenDespawn
 When the vessel selection screen is closed or a vessel is selected and launched More...
 
static EventData
< GameEvents.VesselSpawnInfo
onGUILaunchScreenSpawn
 When the launch screen (that allows you to view and select available vessels) is opened; after selecting the launchpad/runway from the space center. More...
 
static EventData< ShipTemplate > onGUILaunchScreenVesselSelected
 When a vessel is selected from the vessel selection screen at the space center More...
 
static EventVoid onGUIMessageSystemReady
 When the application launcher's message button is ready More...
 
static EventVoid onGUIMissionControlDespawn
 When the mission control center window closes More...
 
static EventVoid onGUIMissionControlSpawn
 When the mission control center window opens More...
 
static EventVoid onGUIPrefabLauncherReady
 When the application launcher (toolbar) loads; triggers before onGUIApplicationLauncherReady and onGUIMessageSystemReady More...
 
static EventData
< MissionRecoveryDialog > 
onGUIRecoveryDialogDespawn
 When the recovery dialog window closes More...
 
static EventData
< MissionRecoveryDialog > 
onGUIRecoveryDialogSpawn
 When the recovery dialog window opens More...
 
static EventVoid onGUIRnDComplexDespawn
 When the R&D center window closes More...
 
static EventVoid onGUIRnDComplexSpawn
 When the R&D center window opens More...
 
static EventVoid onHideUI
 Called when the player hides the UI by pressing F2. Register for this callback (and for onShowUI) so that you can hide your UI too. More...
 
static EventData
< GameEvents.FromToAction
< ControlTypes, ControlTypes > > 
onInputLocksModified
 Triggered when input locks are activated or deactivated; when putting the mouse over one window/button locks the controls of another window/button More...
 
static EventData< EventReportonJointBreak
 Deprecated? Use onPartJointBreak More...
 
static EventData< ProtoCrewMember > onKerbalAdded
 Triggered when a new Kerbal is added in the astronaut complex scene; also triggered when a rescue Kerbal contract is generated More...
 
static EventData< ProtoCrewMember > onKerbalRemoved
 Triggered when a Kerbal is removed from the roster in the astronaut complex; also triggered when a rescue Kerbal contract is failed, expires, or declined More...
 
static EventData
< ProtoCrewMember,
ProtoCrewMember.RosterStatus,
ProtoCrewMember.RosterStatus > 
onKerbalStatusChange
 Triggered when the ProtoCrewMember.RosterStatus changes; usually upon vessel recovery, new crew addition, or death; returns the ProtoCrewMember and its old and new status More...
 
static EventData
< ProtoCrewMember,
ProtoCrewMember.KerbalType,
ProtoCrewMember.KerbalType > 
onKerbalTypeChange
 Triggered when the ProtoCrewMember.KerbalType changes; KerbalTypes are possibly not fully implemented; occurs upon hiring crew or rescuing Kerbal More...
 
static EventData
< GameEvents.HostedFromToAction
< IDiscoverable,
DiscoveryLevels > > 
onKnowledgeChanged
 Triggered upon starting or stopping asteroid tracking, or when approaching an asteroid More...
 
static EventData< Vector3donKrakensbaneDisengage
 Triggered when a vessel's velocity falls below ~750m/s More...
 
static EventData< Vector3donKrakensbaneEngage
 Triggered when a vessel's velocity reaches ~750m/s More...
 
static EventData< EventReportonLaunch
 Triggered when launching by activating the first stage More...
 
static EventData< GameScenesonLevelWasLoaded
 Triggered when a new scene is loaded; returns that GameScene; occurs after onGameSceneLoadRequested More...
 
static EventData< string > onMissionFlagSelect
 Triggered when selecting a new flag from in the editor; returns the flag texture's GameDatabse URL More...
 
static EventData< VesselonNewVesselCreated
 Triggered when spawning a new asteroid or a new Kerbal for a rescue Kerbal contract More...
 
static EventData< EventReportonOverheat
 Triggered when a part overheats; returns an EventReport with the part name More...
 
static EventData< PartonPartActionUICreate
 Triggered when right-clicking a part; returns that part; triggered every time a part event is selected More...
 
static EventData< PartonPartActionUIDismiss
 Triggered when closing the right-click menu of a part More...
 
static EventData
< GameEvents.HostTargetAction
< Part, Part > > 
onPartAttach
 Triggered when adding a part in the editor, when docking, and when another vessel comes into range and is loaded; returns the part and its new parent part More...
 
static EventData
< GameEvents.FromToAction
< Part, Part > > 
onPartCouple
 Triggered when a docking port or asteroid grappling device attaches; returns the host part and the target part More...
 
static EventData< PartonPartDestroyed
 Triggered when a part object's OnDestroy method is called; occurs any time a part or vessel is unloaded, ie scene changes or vessel moving out of loading distance More...
 
static EventData< PartonPartDie
 Triggered when a part is destroyed, usually by exploding/crashing More...
 
static EventData
< GameEvents.ExplosionReaction
onPartExplode
 Triggered when a part explodes, usually due to crashing into the ground or into another part; also triggered by a part overheating and exploding More...
 
static EventData< PartJoint > onPartJointBreak
 Triggered when a part decouples, undocks, a grappling device undocks, a strut breaks, a part is destroyed, or when a part is removed in the editor More...
 
static EventData< PartonPartPack
 Triggered when a part goes on rails (enters timewarp) or exits loading distance More...
 
static EventData< AvailablePartOnPartPurchased
 Triggered when purchasing a part in the R&D center; currently (KSP 0.24.2) called for all parts in a tech node when researching that node More...
 
static EventData
< GameEvents.HostTargetAction
< Part, Part > > 
onPartRemove
 Triggered when removing a part in the editor More...
 
static EventData< PartonPartUndock
 Triggered upon undock event/action; not triggered by a docking node's decouple event; also triggered by asteroid grappling device's release event More...
 
static EventData< PartonPartUnpack
 Triggered when a part goes off rails (exits timewarp) or comes into loading distance More...
 
static EventData< MapObject > onPlanetariumTargetChanged
 Triggered when the map view or tracking station camera focuses on a new object; this can be a Celestial Body or vessel; also triggered when switching to or loading a new vessel More...
 
static EventData< ProgressNode > OnProgressAchieved
 Triggered when a ProgressNode and all of its subNodes are completed. More...
 
static EventData< ProgressNode > OnProgressComplete
 Triggered when all sub ProgressNodes within a given ProgressNode are completed; records the UT of node completion and returns the ProgressNode More...
 
static EventData< ProgressNode > OnProgressReached
 Triggered when a ProgressNode is first reached but not completed; records the UT of node achievement and returns the ProgressNode. More...
 
static EventData< float > OnReputationChanged
 When reputation level changes; returns total rep amount More...
 
static EventData
< GameEvents.HostTargetAction
< CelestialBody, bool > > 
onRotatingFrameTransition
 Triggered when reference frame changes (ie from inertial to rotating); this is generally accompanied by a shift in the camera position and a debug log message ("Reference Frame: Rotating/Inertial") More...
 
static EventData
< GameEvents.FromToAction
< ModuleDockingNode,
ModuleDockingNode > > 
onSameVesselDock
 Triggered when two docking ports on the same vessel dock together More...
 
static EventData
< GameEvents.FromToAction
< ModuleDockingNode,
ModuleDockingNode > > 
onSameVesselUndock
 Triggered when two docking ports on the same vessel undock More...
 
static EventData< float > OnScienceChanged
 When science level changes; returns total science amount More...
 
static EventData< float,
ScienceSubject
OnScienceRecieved
 Triggered science data is transmitted or recovered; returns the amount of science and the ScienceSubject More...
 
static EventVoid onShowUI
 Called when the player un-hides the UI by pressing F2. Register for this callback (and onHideUI) so that you can un-hide your UI too. More...
 
static EventData< EventReportonSplashDamage
 Triggered when engine exhaust damages another part More...
 
static EventData< int > onStageActivate
 Triggered upon staging, returns the stage number More...
 
static EventData< EventReportonStageSeparation
 Triggered by decoupler staging; also triggered by separation through a decoupler's right-click menu event More...
 
static EventData
< GameEvents.HostTargetAction
< RDTech,
RDTech.OperationResult > > 
OnTechnologyResearched
 Triggered when researching a tech node in the R&D center; triggers whether or not you have enough science to unlock the node More...
 
static EventVoid onTimeWarpRateChanged
 Triggered whenever timewarp rate changes; applies to physics and non-physics timewarp; triggered by the key press also (called even if you are at max/min timewarp already) More...
 
static EventData< EventReportonUndock
 Deprecated? Use onPartUndock More...
 
static EventData< VesselonVesselChange
 Triggered when switching to a different vessel, loading a vessel, or launching More...
 
static EventData< VesselonVesselCreate
 Triggered when a vessel is launched, or created by undocking, decoupling, planting a flag, or EVA; also triggered by new asteroid creation and rescue Kerbal contracts More...
 
static EventData< VesselonVesselDestroy
 Triggered when a vessel instance is destroyed; any time a vessel is unloaded, ie scene changes, exiting loading distance More...
 
static EventData< VesselonVesselGoOffRails
 Triggered when a vessel is loaded on the launchpad, when a vessel enters within loading distance, or when a vessel goes off of time warp More...
 
static EventData< VesselonVesselGoOnRails
 Triggered when a vessel exits loading distance or enters time warp More...
 
static EventData< VesselonVesselLoaded
 Triggered whenever a vessel's load method is called More...
 
static EventData< VesselonVesselOrbitClosed
 Triggered when a closed orbit is reached More...
 
static EventData< VesselonVesselOrbitEscaped
 Triggered when orbit eccentricity becomes > 1 More...
 
static EventData< ProtoVessel > onVesselRecovered
 Triggered after a vessel has been recovered and the science data and part values have been accounted for; occurs in the space center or tracking station. More...
 
static EventData< ProtoVessel,
MissionRecoveryDialog, float > 
onVesselRecoveryProcessing
 Triggered in the space center or tracking station when a vessel is recovered; occurs before onVesselRecovered More...
 
static EventData< VesselOnVesselRecoveryRequested
 Triggered a vessel is recovered (the big green button at the top) from the flight scene More...
 
static EventData
< GameEvents.HostedFromToAction
< Vessel, string > > 
onVesselRename
 Returns old 'from' vessel name and new 'to' vessel name More...
 
static EventData< ShipConstructOnVesselRollout
 Triggered when vessel is loaded onto the launchpad from the editor/launch selection window; called after the transition to flight scene More...
 
static EventData
< GameEvents.HostedFromToAction
< Vessel, Vessel.Situations > > 
onVesselSituationChange
 Returns old and new vessel situations More...
 
static EventData
< GameEvents.HostedFromToAction
< Vessel, CelestialBody > > 
onVesselSOIChanged
 Returns old and new Celestial Body More...
 
static EventData< ProtoVessel > onVesselTerminated
 Triggered when a vessel is deleted from the tracking station More...
 
static EventData< VesselonVesselWasModified
 Triggered when any aspect of a vessel changes; docking, undocking, decoupling, parts breaking, crash, etc... More...
 
static EventData< VesselonVesselWillDestroy
 Triggered when a vessel crashes, or passes into the atmosphere; when an EVA Kerbal boards, or when an asteroid is despawned More...
 

Detailed Description

GameEvents are EventData or EventVoid methods called when certain conditions are met.

Many include some relevant data on the objects affected when they are triggered.

Use:

GameEvents.desiredEvent.Add(yourMethod);

and

GameEvents.desiredEvent.Removed(yourMethod);

to add and remove methods from a list of methods to be called when the event is triggered.

Methods are generally added in your object's Start or Awake method and generally removed in your object's OnDestroy method.

Be sure not add methods multiple times withoud destroying them between additions.

Member Data Documentation

bool GameEvents.debugEvents
static
EventData<Vessel> GameEvents.onActiveJointNeedUpdate
static

Triggered when a vessel docks or attaches with the grappling device; fires twice, once for each vessel

EventData<EventReport> GameEvents.onCollision
static

Triggered when two parts collide

EventData<EventReport> GameEvents.onCrash
static

Triggered when a part or vessel crashes into the terrain

EventData<EventReport> GameEvents.onCrashSplashdown
static

Triggered when a part crashes into the ocean

EventData<GameEvents.FromToAction<Part, Part> > GameEvents.onCrewBoardVessel
static

Triggered when an EVA Kerbal boards a vessel

EventData<EventReport> GameEvents.onCrewKilled
static

Triggered whenever a Kerbal dies; either on EVA or in a crashing vessel

EventData<GameEvents.FromToAction<Part, Part> > GameEvents.onCrewOnEva
static

Triggered when a Kerbal goes on EVA

EventData<GameEvents.FromToAction<CelestialBody, CelestialBody> > GameEvents.onDominantBodyChange
static

Triggered when changing SOI; both objects return the new dominant CelestialBody

See also onVesselSOIChanged

EventData<ShipConstruct> GameEvents.onEditorShipModified
static

Triggered when any part is added or removed from a vessel in the editor; also triggered when any tweakable settings are changed; also when undo is called

EventData<Vessel> GameEvents.onFlagPlant
static

When a flag is planted by an EVA Kerbal

EventData<string> GameEvents.onFlagSelect
static

Triggered when a flag is selected from the space center's flag pole

EventVoid GameEvents.onFlightReady
static

Triggered when a vessel is fully loaded

EventData<Vector3d> GameEvents.onFloatingOriginShift
static

Deprecated?

EventData<double> GameEvents.OnFundsChanged
static

When Funds level changes, returns total Funds amount

EventVoid GameEvents.onGamePause
static

When the game is paused

EventData<GameScenes> GameEvents.onGameSceneLoadRequested
static

Triggered upon scene change requests; returns the target GameScene

EventVoid GameEvents.OnGameSettingsApplied
static

When Game Settings are applied in the main settings menu, or the in-game settings menu

EventData<Game> GameEvents.onGameStateCreated
static

When a game is first created or loaded; returns the Game object

EventData<ConfigNode> GameEvents.onGameStateLoad
static

Triggered on loading a game, returns the game's full ConfigNode from the persistent file

EventData<ConfigNode> GameEvents.onGameStateSave
static

Triggered on saving a game, returns the game's full ConfigNode from the persistent file

EventData<Game> GameEvents.onGameStateSaved
static

Triggered when a game is saved, returns the Game object;

EventVoid GameEvents.onGameUnpause
static

When the game is unpaused

EventVoid GameEvents.onGUIApplicationLauncherDestroyed
static

When the application launcher (toolbar) is closed

EventVoid GameEvents.onGUIApplicationLauncherReady
static

Called when the ApplicationLauncher toolbar is ready to have buttons added to it.

EventVoid GameEvents.onGUIAstronautComplexDespawn
static

When the astronaut complex window closes

EventVoid GameEvents.onGUIAstronautComplexSpawn
static

When the astronaut complex window opens; from the space center or editor

EventVoid GameEvents.onGUILaunchScreenDespawn
static

When the vessel selection screen is closed or a vessel is selected and launched

EventData<GameEvents.VesselSpawnInfo> GameEvents.onGUILaunchScreenSpawn
static

When the launch screen (that allows you to view and select available vessels) is opened; after selecting the launchpad/runway from the space center.

See VesselSpawnInfo for more on what is returned by this callback.

EventData<ShipTemplate> GameEvents.onGUILaunchScreenVesselSelected
static

When a vessel is selected from the vessel selection screen at the space center

EventVoid GameEvents.onGUIMessageSystemReady
static

When the application launcher's message button is ready

EventVoid GameEvents.onGUIMissionControlDespawn
static

When the mission control center window closes

EventVoid GameEvents.onGUIMissionControlSpawn
static

When the mission control center window opens

EventVoid GameEvents.onGUIPrefabLauncherReady
static

When the application launcher (toolbar) loads; triggers before onGUIApplicationLauncherReady and onGUIMessageSystemReady

EventData<MissionRecoveryDialog> GameEvents.onGUIRecoveryDialogDespawn
static

When the recovery dialog window closes

EventData<MissionRecoveryDialog> GameEvents.onGUIRecoveryDialogSpawn
static

When the recovery dialog window opens

EventVoid GameEvents.onGUIRnDComplexDespawn
static

When the R&D center window closes

EventVoid GameEvents.onGUIRnDComplexSpawn
static

When the R&D center window opens

EventVoid GameEvents.onHideUI
static

Called when the player hides the UI by pressing F2. Register for this callback (and for onShowUI) so that you can hide your UI too.

EventData<GameEvents.FromToAction<ControlTypes, ControlTypes> > GameEvents.onInputLocksModified
static

Triggered when input locks are activated or deactivated; when putting the mouse over one window/button locks the controls of another window/button

EventData<EventReport> GameEvents.onJointBreak
static

Deprecated? Use onPartJointBreak

EventData<ProtoCrewMember> GameEvents.onKerbalAdded
static

Triggered when a new Kerbal is added in the astronaut complex scene; also triggered when a rescue Kerbal contract is generated

EventData<ProtoCrewMember> GameEvents.onKerbalRemoved
static

Triggered when a Kerbal is removed from the roster in the astronaut complex; also triggered when a rescue Kerbal contract is failed, expires, or declined

EventData<ProtoCrewMember, ProtoCrewMember.RosterStatus, ProtoCrewMember.RosterStatus> GameEvents.onKerbalStatusChange
static

Triggered when the ProtoCrewMember.RosterStatus changes; usually upon vessel recovery, new crew addition, or death; returns the ProtoCrewMember and its old and new status

EventData<ProtoCrewMember, ProtoCrewMember.KerbalType, ProtoCrewMember.KerbalType> GameEvents.onKerbalTypeChange
static

Triggered when the ProtoCrewMember.KerbalType changes; KerbalTypes are possibly not fully implemented; occurs upon hiring crew or rescuing Kerbal

EventData<GameEvents.HostedFromToAction<IDiscoverable, DiscoveryLevels> > GameEvents.onKnowledgeChanged
static

Triggered upon starting or stopping asteroid tracking, or when approaching an asteroid

EventData<Vector3d> GameEvents.onKrakensbaneDisengage
static

Triggered when a vessel's velocity falls below ~750m/s

EventData<Vector3d> GameEvents.onKrakensbaneEngage
static

Triggered when a vessel's velocity reaches ~750m/s

EventData<EventReport> GameEvents.onLaunch
static

Triggered when launching by activating the first stage

EventData<GameScenes> GameEvents.onLevelWasLoaded
static

Triggered when a new scene is loaded; returns that GameScene; occurs after onGameSceneLoadRequested

EventData<string> GameEvents.onMissionFlagSelect
static

Triggered when selecting a new flag from in the editor; returns the flag texture's GameDatabse URL

EventData<Vessel> GameEvents.onNewVesselCreated
static

Triggered when spawning a new asteroid or a new Kerbal for a rescue Kerbal contract

EventData<EventReport> GameEvents.onOverheat
static

Triggered when a part overheats; returns an EventReport with the part name

EventData<Part> GameEvents.onPartActionUICreate
static

Triggered when right-clicking a part; returns that part; triggered every time a part event is selected

EventData<Part> GameEvents.onPartActionUIDismiss
static

Triggered when closing the right-click menu of a part

EventData<GameEvents.HostTargetAction<Part, Part> > GameEvents.onPartAttach
static

Triggered when adding a part in the editor, when docking, and when another vessel comes into range and is loaded; returns the part and its new parent part

EventData<GameEvents.FromToAction<Part, Part> > GameEvents.onPartCouple
static

Triggered when a docking port or asteroid grappling device attaches; returns the host part and the target part

EventData<Part> GameEvents.onPartDestroyed
static

Triggered when a part object's OnDestroy method is called; occurs any time a part or vessel is unloaded, ie scene changes or vessel moving out of loading distance

EventData<Part> GameEvents.onPartDie
static

Triggered when a part is destroyed, usually by exploding/crashing

EventData<GameEvents.ExplosionReaction> GameEvents.onPartExplode
static

Triggered when a part explodes, usually due to crashing into the ground or into another part; also triggered by a part overheating and exploding

EventData<PartJoint> GameEvents.onPartJointBreak
static

Triggered when a part decouples, undocks, a grappling device undocks, a strut breaks, a part is destroyed, or when a part is removed in the editor

EventData<Part> GameEvents.onPartPack
static

Triggered when a part goes on rails (enters timewarp) or exits loading distance

EventData<AvailablePart> GameEvents.OnPartPurchased
static

Triggered when purchasing a part in the R&D center; currently (KSP 0.24.2) called for all parts in a tech node when researching that node

EventData<GameEvents.HostTargetAction<Part, Part> > GameEvents.onPartRemove
static

Triggered when removing a part in the editor

EventData<Part> GameEvents.onPartUndock
static

Triggered upon undock event/action; not triggered by a docking node's decouple event; also triggered by asteroid grappling device's release event

EventData<Part> GameEvents.onPartUnpack
static

Triggered when a part goes off rails (exits timewarp) or comes into loading distance

EventData<MapObject> GameEvents.onPlanetariumTargetChanged
static

Triggered when the map view or tracking station camera focuses on a new object; this can be a Celestial Body or vessel; also triggered when switching to or loading a new vessel

EventData<ProgressNode> GameEvents.OnProgressAchieved
static

Triggered when a ProgressNode and all of its subNodes are completed.

See also OnProgressReached and OnProgressComplete

EventData<ProgressNode> GameEvents.OnProgressComplete
static

Triggered when all sub ProgressNodes within a given ProgressNode are completed; records the UT of node completion and returns the ProgressNode

See the ProgressTracking module in the persistent.sfs file for more on how ProgressNodes are setup and saved.

If the ProgressNode is completed upon first achievement this will also trigger OnProgressReached.

See also OnProgressReached and OnProgressAchieved

EventData<ProgressNode> GameEvents.OnProgressReached
static

Triggered when a ProgressNode is first reached but not completed; records the UT of node achievement and returns the ProgressNode.

For instance, when a vessels first enters the SOI of a new Celestial Body the event will trigger and a "reached" entry will be added to the persistent.sfs file.

If a ProgressNode is completed at the same time it is reached (ie has no ProgressNode subNodes) OnProgressCompelete will be triggered at the same time

See the ProgressTracking module in the persistent.sfs file for more on how ProgressNodes are setup and saved.

See also OnProgressComplete and OnProgressAchieved

EventData<float> GameEvents.OnReputationChanged
static

When reputation level changes; returns total rep amount

EventData<GameEvents.HostTargetAction<CelestialBody, bool> > GameEvents.onRotatingFrameTransition
static

Triggered when reference frame changes (ie from inertial to rotating); this is generally accompanied by a shift in the camera position and a debug log message ("Reference Frame: Rotating/Inertial")

EventData<GameEvents.FromToAction<ModuleDockingNode, ModuleDockingNode> > GameEvents.onSameVesselDock
static

Triggered when two docking ports on the same vessel dock together

EventData<GameEvents.FromToAction<ModuleDockingNode, ModuleDockingNode> > GameEvents.onSameVesselUndock
static

Triggered when two docking ports on the same vessel undock

EventData<float> GameEvents.OnScienceChanged
static

When science level changes; returns total science amount

EventData<float, ScienceSubject> GameEvents.OnScienceRecieved
static

Triggered science data is transmitted or recovered; returns the amount of science and the ScienceSubject

EventVoid GameEvents.onShowUI
static

Called when the player un-hides the UI by pressing F2. Register for this callback (and onHideUI) so that you can un-hide your UI too.

EventData<EventReport> GameEvents.onSplashDamage
static

Triggered when engine exhaust damages another part

EventData<int> GameEvents.onStageActivate
static

Triggered upon staging, returns the stage number

EventData<EventReport> GameEvents.onStageSeparation
static

Triggered by decoupler staging; also triggered by separation through a decoupler's right-click menu event

EventData<GameEvents.HostTargetAction<RDTech, RDTech.OperationResult> > GameEvents.OnTechnologyResearched
static

Triggered when researching a tech node in the R&D center; triggers whether or not you have enough science to unlock the node

EventVoid GameEvents.onTimeWarpRateChanged
static

Triggered whenever timewarp rate changes; applies to physics and non-physics timewarp; triggered by the key press also (called even if you are at max/min timewarp already)

EventData<EventReport> GameEvents.onUndock
static

Deprecated? Use onPartUndock

EventData<Vessel> GameEvents.onVesselChange
static

Triggered when switching to a different vessel, loading a vessel, or launching

EventData<Vessel> GameEvents.onVesselCreate
static

Triggered when a vessel is launched, or created by undocking, decoupling, planting a flag, or EVA; also triggered by new asteroid creation and rescue Kerbal contracts

EventData<Vessel> GameEvents.onVesselDestroy
static

Triggered when a vessel instance is destroyed; any time a vessel is unloaded, ie scene changes, exiting loading distance

EventData<Vessel> GameEvents.onVesselGoOffRails
static

Triggered when a vessel is loaded on the launchpad, when a vessel enters within loading distance, or when a vessel goes off of time warp

EventData<Vessel> GameEvents.onVesselGoOnRails
static

Triggered when a vessel exits loading distance or enters time warp

EventData<Vessel> GameEvents.onVesselLoaded
static

Triggered whenever a vessel's load method is called

EventData<Vessel> GameEvents.onVesselOrbitClosed
static

Triggered when a closed orbit is reached

EventData<Vessel> GameEvents.onVesselOrbitEscaped
static

Triggered when orbit eccentricity becomes > 1

EventData<ProtoVessel> GameEvents.onVesselRecovered
static

Triggered after a vessel has been recovered and the science data and part values have been accounted for; occurs in the space center or tracking station.

Triggered after onVesselRecoveryProcessing

EventData<ProtoVessel, MissionRecoveryDialog, float> GameEvents.onVesselRecoveryProcessing
static

Triggered in the space center or tracking station when a vessel is recovered; occurs before onVesselRecovered

EventData<Vessel> GameEvents.OnVesselRecoveryRequested
static

Triggered a vessel is recovered (the big green button at the top) from the flight scene

EventData<GameEvents.HostedFromToAction<Vessel, string> > GameEvents.onVesselRename
static

Returns old 'from' vessel name and new 'to' vessel name

EventData<ShipConstruct> GameEvents.OnVesselRollout
static

Triggered when vessel is loaded onto the launchpad from the editor/launch selection window; called after the transition to flight scene

EventData<GameEvents.HostedFromToAction<Vessel, Vessel.Situations> > GameEvents.onVesselSituationChange
static

Returns old and new vessel situations

EventData<GameEvents.HostedFromToAction<Vessel, CelestialBody> > GameEvents.onVesselSOIChanged
static

Returns old and new Celestial Body

EventData<ProtoVessel> GameEvents.onVesselTerminated
static

Triggered when a vessel is deleted from the tracking station

EventData<Vessel> GameEvents.onVesselWasModified
static

Triggered when any aspect of a vessel changes; docking, undocking, decoupling, parts breaking, crash, etc...

EventData<Vessel> GameEvents.onVesselWillDestroy
static

Triggered when a vessel crashes, or passes into the atmosphere; when an EVA Kerbal boards, or when an asteroid is despawned


The documentation for this class was generated from the following file: