Jump to content

Detect Fairing Deploy


Recommended Posts

Any ideas how to hook up to the ModuleProceduralFairing.DeployFairing call?

My FlightOperations mod needs to track fairing deploy and jettison events. They don't seem to fire any obvious global events. Any ideas? I suspect the answer for this will apply to a great many of the part events I need to connect to.

Link to comment
Share on other sites

Just double checked - GameEvents.onVesselWasModified fires when I stage a stock fairing. Downside - would then need to check that the fairing had changed and not something else.

GameEvents.onVesselChange is another possibility - don't remember what the difference is - someone (JPLRepo?) explained the difference - is also fed a vessel so same downside.

Link to comment
Share on other sites

GameEvents.onVesselChange is fired when you switch vessels.
GameEvents.onVesselWasModified is fired when a vessel is modified for various reasons. One of those reasons includes when the fairings are deployed.
When that occurs, you could check the vessel passed in. Then you could look at the Part Modules and the ModuleProceduralFairing.Panels list. If it's empty, guess what? :cool:

Link to comment
Share on other sites

1 hour ago, JPLRepo said:

GameEvents.onVesselChange is fired when you switch vessels.

Ahh! I was confusing this with something else -  have a dim memory (imaginary?) of another event that triggered on a change to a vessel but didn't cover as many situation - or something like that.

1 hour ago, JPLRepo said:

Then you could look at the Part Modules and the ModuleProceduralFairing.Panels list.

I figured the down side was that to act like an event you would need to track this so you only process this the first time you find it jettisoned. Then there's always the possibility of multiple fairings so stopping the check after the first time wouldn't be an option. But ModuleProceduralFairing.Panels list - good to know - thanks.

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