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

Apply this attribute to a function in a PartModule to make it callable by the player via the right click menu of the part, or from other plugin code via Part.SendEvent. More...

Inheritance diagram for KSPEvent:

Public Member Functions

 KSPEvent ()
 

Public Attributes

bool active
 Whether this event can be triggered through Part.SendEvent. More...
 
string category
 
bool externalToEVAOnly
 Whether the event is only available when out on EVA. More...
 
bool guiActive
 Whether the event is shown as available in the right click menu (active must also be true). More...
 
bool guiActiveUnfocused
 Whether the event is shown as available in the right click menu even when the part is on a ship not currently being controlled by the player (but close enough to right click). More...
 
string guiIcon
 
string guiName
 The name shown for the event in the right click menu. More...
 
bool isDefault
 
string name
 The name of the event, which can be used to trigger the event using from plugin code using Part.SendEvent. More...
 
float unfocusedRange
 When the part is on a ship not being controlled by the player, how close the player needs to be (in meters) in order for the event to appear in the right click menu. More...
 

Detailed Description

Apply this attribute to a function in a PartModule to make it callable by the player via the right click menu of the part, or from other plugin code via Part.SendEvent.

It seems like this attribute is NOT refreshed on parts already in flight when you rebuild your module DLL! You need to launch a new ship with your part.

Constructor & Destructor Documentation

KSPEvent.KSPEvent ( )

Member Data Documentation

bool KSPEvent.active

Whether this event can be triggered through Part.SendEvent.

string KSPEvent.category
bool KSPEvent.externalToEVAOnly

Whether the event is only available when out on EVA.

bool KSPEvent.guiActive

Whether the event is shown as available in the right click menu (active must also be true).

bool KSPEvent.guiActiveUnfocused

Whether the event is shown as available in the right click menu even when the part is on a ship not currently being controlled by the player (but close enough to right click).

string KSPEvent.guiIcon
string KSPEvent.guiName

The name shown for the event in the right click menu.

bool KSPEvent.isDefault
string KSPEvent.name

The name of the event, which can be used to trigger the event using from plugin code using Part.SendEvent.

float KSPEvent.unfocusedRange

When the part is on a ship not being controlled by the player, how close the player needs to be (in meters) in order for the event to appear in the right click menu.


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