|
static bool | debugEvents |
|
static EventData< Vessel > | onActiveJointNeedUpdate |
| Triggered when a vessel docks or attaches with the grappling device; fires twice, once for each vessel More...
|
|
static EventData< EventReport > | onCollision |
| Triggered when two parts collide More...
|
|
static EventData< EventReport > | onCrash |
| Triggered when a part or vessel crashes into the terrain More...
|
|
static EventData< EventReport > | onCrashSplashdown |
| 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< EventReport > | onCrewKilled |
| 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< ShipConstruct > | onEditorShipModified |
| 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< Vessel > | onFlagPlant |
| 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< Vector3d > | onFloatingOriginShift |
| 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< GameScenes > | onGameSceneLoadRequested |
| 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< ConfigNode > | onGameStateLoad |
| Triggered on loading a game, returns the game's full ConfigNode from the persistent file More...
|
|
static EventData< ConfigNode > | onGameStateSave |
| 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< EventReport > | onJointBreak |
| 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< Vector3d > | onKrakensbaneDisengage |
| Triggered when a vessel's velocity falls below ~750m/s More...
|
|
static EventData< Vector3d > | onKrakensbaneEngage |
| Triggered when a vessel's velocity reaches ~750m/s More...
|
|
static EventData< EventReport > | onLaunch |
| Triggered when launching by activating the first stage More...
|
|
static EventData< GameScenes > | onLevelWasLoaded |
| 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< Vessel > | onNewVesselCreated |
| Triggered when spawning a new asteroid or a new Kerbal for a rescue Kerbal contract More...
|
|
static EventData< EventReport > | onOverheat |
| Triggered when a part overheats; returns an EventReport with the part name More...
|
|
static EventData< Part > | onPartActionUICreate |
| Triggered when right-clicking a part; returns that part; triggered every time a part event is selected More...
|
|
static EventData< Part > | onPartActionUIDismiss |
| 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< Part > | onPartDestroyed |
| 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< Part > | onPartDie |
| 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< Part > | onPartPack |
| Triggered when a part goes on rails (enters timewarp) or exits loading distance More...
|
|
static EventData< AvailablePart > | OnPartPurchased |
| 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< Part > | onPartUndock |
| 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< Part > | onPartUnpack |
| 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< EventReport > | onSplashDamage |
| Triggered when engine exhaust damages another part More...
|
|
static EventData< int > | onStageActivate |
| Triggered upon staging, returns the stage number More...
|
|
static EventData< EventReport > | onStageSeparation |
| 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< EventReport > | onUndock |
| Deprecated? Use onPartUndock More...
|
|
static EventData< Vessel > | onVesselChange |
| Triggered when switching to a different vessel, loading a vessel, or launching More...
|
|
static EventData< Vessel > | onVesselCreate |
| 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< Vessel > | onVesselDestroy |
| Triggered when a vessel instance is destroyed; any time a vessel is unloaded, ie scene changes, exiting loading distance More...
|
|
static EventData< Vessel > | onVesselGoOffRails |
| 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< Vessel > | onVesselGoOnRails |
| Triggered when a vessel exits loading distance or enters time warp More...
|
|
static EventData< Vessel > | onVesselLoaded |
| Triggered whenever a vessel's load method is called More...
|
|
static EventData< Vessel > | onVesselOrbitClosed |
| Triggered when a closed orbit is reached More...
|
|
static EventData< Vessel > | onVesselOrbitEscaped |
| 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< Vessel > | OnVesselRecoveryRequested |
| 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< ShipConstruct > | OnVesselRollout |
| 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< Vessel > | onVesselWasModified |
| Triggered when any aspect of a vessel changes; docking, undocking, decoupling, parts breaking, crash, etc... More...
|
|
static EventData< Vessel > | onVesselWillDestroy |
| Triggered when a vessel crashes, or passes into the atmosphere; when an EVA Kerbal boards, or when an asteroid is despawned More...
|
|
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.