After using RequestTeleportAction to with a correctly set altitude, the plane spawns at the correct position but not the correct altitude.. Also, the plane comes crashing down.
Please take a moment to read the platform’s guidelines before you get started!
I can confirm this issue to for BushTripInjector.
RequestTeleportAction is working for 0.5 seconds, then the plane falls to ground immediately and crashes (if no-crash-mode is off). If no-crash-mode is on, the plane is on correct lat/lon, but grounded. Also speed and powersettings are ignored.
Hello,
The developer behind missions design is out of the office at the moment. I'll make sure he takes a look at this when he gets back!
For the RequestTeleportAction to work properly you need to specify a SimState file, which is just an .FLT file that defines state of the aircraft after the teleport. Variables you don't define in the SimState file will be filled in from the last used .FLT, usually the .FLT that loaded the flight. This means that after teleport, things like lights, flaps, and crucially simvars, will be reset to the state at the start of the flight.
The simvars contain the coordinates, altitude, orientation, speeds, and a variable called SimOnGround:
[SimVars.0] Latitude=N37° 57' 15.09" Longitude=W107° 54' 7.20" Altitude=+015009.81 Pitch=-1.7961822304756200896 Bank=0 Heading=67.595765396585463236 PVelBodyAxis=0 BVelBodyAxis=0 HVelBodyAxis=0 XVelBodyAxis=-8.3283299715813328135 YVelBodyAxis=-12.848052061414350078 ZVelBodyAxis=465.00570101166533732 SimOnGround=False OnPlatformHeight=-9999999999
The coordinates, altitude, and orientation can be defined by the RequestTeleportAction, but the speeds and SimOnGround will be reset to the start. So if the flight started on the ground and the teleport was in the air, SimOnGround will be reset to True, and the plane will be put on the ground immediately after teleport.
To fix this, you should use a SimStateFile. This is the configuration that worked for me:
<SimMission.RequestTeleportAction InstanceId="{858FF2F5-D5DA-42D6-BB25-0DADB7204774}"> <SimStateFilename>offground</SimStateFilename> <AttachedWorldPosition> <WorldPosition>N41° 1' 52.45",W113° 44' 27.00",+007000.00</WorldPosition> <AltitudeIsAGL>False</AltitudeIsAGL> <Orientation>0.000,0.000,145.000</Orientation> <IsOnGround>False</IsOnGround> </AttachedWorldPosition> </SimMission.RequestTeleportAction>
offground.FLT:
[SimVars.0] SimOnGround=False XVelBodyAxis=0 YVelBodyAxis=0 ZVelBodyAxis=200.000
This will make sure the plane doesn't teleport to the ground and has forward speed, but still reset things changed after spawn such as flaps, gear, and lights, but you can add them to the .FLT as well.
I don't think this is the best way for the teleport to work. I think it would be better it the RequestTeleportAction didn't reset variables to the state at the start, but kept them the same as immediately before the teleport.
PS: You can specify Airspeed in the RequestTeleportAction, but it didn't work properly in my experience.
MSFS is searching them only in the saved_missions folders and not in the base folder of the trip.
5 People are following this question.