VesselMover
VesselMover copied to clipboard
Spawn Vessel causing pre-triggering of actions
When using the Spawn Vessel function I have found that it causes triggering of actions before they are to occur
In the video below I have attached landing gear to small hardpoints that have had their staging turned off as well as being linked to the landing gear action group so that when the AI retracts the landing gear it triggers the small hardpoints to release leaving the craft with no landing gear
It appears that a vessel spawned with the SV function gets it's action groups triggered for some reason ... possibly the gears are being triggered when the craft becomes airborne due to some snippet of code that is used to calculate where the surface is during the spawn process as it doesn't occur if I just move the vessel off the runway, return to the space center and launch another of the same craft on the runway - See Video
Log file: https://www.dropbox.com/s/k82daqjticll41p/VM%20Spawn%20Vessel%20Issue.log.log?dl=0 Video: https://youtu.be/ultjlUmj1-U
I wonder if you found an edge case. I mean that the AI will automatically retract gear when takeoff occurs, right? If so, and Vessel Mover has "changed" an altitude setting somewhere, it could be "fooling" the AI into believing that "it is time"...
So it may not be triggering "any" actions, but one that is specific to how the AI behaves in competition mode?
I actually just finished another test and it is related to the take off speed ... It happens when the craft reaches the take off speed set in the AI Pilot settings
You will see in the video that the gears do not retract but the small hardpoints that I set to be triggered do trigger at the right time on the regularly launched craft but the spawned one has it's gears still down until it reaches altitude but decouples the small hardpoint when take off speed is reached
Log file: https://www.dropbox.com/s/05p2zysk9qnedso/VM%20Spawn%20Vessel%20Issue.log%2002.log?dl=0 Video: https://youtu.be/Wtr_CPzGPqY
The spawn function builds a vessel from parts in a protoVessel then activates it in game here
In order for the vessel to have the correct state it is set to prelaunch here
I think something is happening related to the state of the vessel when transitioning, certain vessel states will keep parts from being active which affects staging.
Marking this as "Need info" for gathering more debug data from the example scenario