Launching, docking and sub-entities
Posted: Mon Oct 15, 2012 6:01 pm
My current OXP project has a few problems with which I'd like some help or advice.
The ship in question has subents which are removed and replaced by script in certain situations. One of these situations is when it needs to dock. Now because the sub-ents are removed when the ship is docked this triggers a Maintenace Overhaul which is not desirable - the subents are supposed to be 'missing' at this point and do not require replacing. To avoid this I have been removing them as needed by the OXP (prior to docking) then adding them back with a shipDockedWithStation handler. On launch they are then removed again and this is successfully avoiding the overhaul from being called.
However this is causing other problems. Using the shipWillLaunchFromStation handler, the launch is messy - the docking tunnel effect flies off the top of the screen and often the ship launches at an angle to the station-buoy line. This suggests that the sub-ents are still present at the start of the tunnel effect and their removal at this moment is affecting the launch. Although I have not seen this myself, one of my co-conspirators reports that this also happens sometimes if shipLaunchedFromStation is used. Also, if shipLaunchedFromStation is used the subents (which aren't really supposed to be there at this point, remember) are visible as well, so not very satisfactory really.
So can anybody suggest a way the subents can be completely removed before the launch begins? Or better still is there any way of disabling the maintenace overhaul when it is caused by intentionally missing sub-ents?
The ship in question has subents which are removed and replaced by script in certain situations. One of these situations is when it needs to dock. Now because the sub-ents are removed when the ship is docked this triggers a Maintenace Overhaul which is not desirable - the subents are supposed to be 'missing' at this point and do not require replacing. To avoid this I have been removing them as needed by the OXP (prior to docking) then adding them back with a shipDockedWithStation handler. On launch they are then removed again and this is successfully avoiding the overhaul from being called.
However this is causing other problems. Using the shipWillLaunchFromStation handler, the launch is messy - the docking tunnel effect flies off the top of the screen and often the ship launches at an angle to the station-buoy line. This suggests that the sub-ents are still present at the start of the tunnel effect and their removal at this moment is affecting the launch. Although I have not seen this myself, one of my co-conspirators reports that this also happens sometimes if shipLaunchedFromStation is used. Also, if shipLaunchedFromStation is used the subents (which aren't really supposed to be there at this point, remember) are visible as well, so not very satisfactory really.
So can anybody suggest a way the subents can be completely removed before the launch begins? Or better still is there any way of disabling the maintenace overhaul when it is caused by intentionally missing sub-ents?