Hello, :hello:
I'd like to prevent Orbiter to write [ATTACHED 0:0, xyz] in the scenario file (in the attached vessel section) when I save my game with a custom vessel I made. The idea is that I don't want the attached vessel to "remind" the attachment. So I'd like to destroy and recreate the attachment at each Save/Load cycle.
But that doesn't seem so simple. I've tried to place the DetachChild(...) instruction in "clbkEndSession", which according to the API guide is :
So it seems it is the perfect place to put DetachChild(...). But that doesn't work, in the (Current state).scn file, the passive (child) vessel still has that [ATTACHED 0:0, myship] line.
:compbash:
So, any suggestions ? Thanks ! :tiphat:
I'd like to prevent Orbiter to write [ATTACHED 0:0, xyz] in the scenario file (in the attached vessel section) when I save my game with a custom vessel I made. The idea is that I don't want the attached vessel to "remind" the attachment. So I'd like to destroy and recreate the attachment at each Save/Load cycle.
But that doesn't seem so simple. I've tried to place the DetachChild(...) instruction in "clbkEndSession", which according to the API guide is :
:facts:Called before the end of a simulation session. At the point of call, logical objects still exist (OBJHANDLEs valid), and external modules are still loaded.
So it seems it is the perfect place to put DetachChild(...). But that doesn't work, in the (Current state).scn file, the passive (child) vessel still has that [ATTACHED 0:0, myship] line.
:compbash:
So, any suggestions ? Thanks ! :tiphat: