George added the <OnObjDestroyed> event to dockscreens in 1.9a1. I would like to use it to navigate to a different screen if the object in the dockscreen, modified dock service screens in this case, is destroyed. But I'm not sure how to do this.
Supposedly the object needs to be registered for the event.
What populated variables (I think they are called aThingy, etc) are available? Testing shows that gSource is the Taipan playership which has the modified screens.
What would the code need to check for? The screen? The object? Events still confuse me.
The event would be added to a base-class dockscreen, a modified copy of &dsRPGDockServicesBase;, which is inherited by all dock service screens in the Taipan GodShip mod.
These dock service screens can use either the playership or an NPC ship as the 'shipObj'.
To my thinking there would need to be an <OnScreenInit> block which registered the object for events.
Then the <OnObjDestroyed> event would have code to check for the object being destroyed and, if so, navigate to another screen.
But I don't know how the code should look.
TIA.