(Add page content) |
(Add to Tools category) |
||
Line 15: | Line 15: | ||
This mod displays Messages as they are being triggered, colors them to make it easier to see when the event was triggered and it keeps a count of how many times an event has been triggered so far. | This mod displays Messages as they are being triggered, colors them to make it easier to see when the event was triggered and it keeps a count of how many times an event has been triggered so far. | ||
[[File:ShowKSP2Events.png|left|thumb]] | [[File:ShowKSP2Events 1.2.0.png|left|thumb|1000x1000px]] | ||
[[Category:Tools]] |
Revision as of 07:15, 5 May 2023
Game triggers a bunch of Messages (events) you can subscribe to in your code in order to react to those messages.
For instance VesselDeltaVCalculationMessage
for whenever the game is doing updates to any vessel deltav, or UIButtonClickedMessage
for when the player clicks on any UI element.
You could always do any check inside an Update() method of your plugin class, but using Messages is more efficient when you need to do checks on events that are not triggered very often.
To see what Messages are being triggered on certain events you an use the ShowKSP2Events
mod:
https://github.com/Falki-git/ShowKSP2Events.
This mod displays Messages as they are being triggered, colors them to make it easier to see when the event was triggered and it keeps a count of how many times an event has been triggered so far.