SimpleAirplane, SetCrashMode and reload?

For topics related to the creation of simulation objects (SimObjects). This includes development of aircraft, ground, and maritime vehicles.
Post Reply
pine-nut
Posts: 7
Joined: Sat May 27, 2023 10:07 am

SimpleAirplane, SetCrashMode and reload?

Post by pine-nut »

Hi, In the example SimpleAirplane, I used m_BaseObject.SetCrashMode(dDeltaT) in the function: STDMETHOD (Update)(double dDeltaT) . It will popup "Crashed". However it does not reload SimpleAirplane? What should I do?
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: SimpleAirplane, SetCrashMode and reload?

Post by Clifton Crane »

Hello,

Try calling SetCrashMode in your Simulate callback and passing in the provided delta time. The crash state will reset after a period of time and reload your last scenario.

Regards,
Clifton
Clifton Crane
Prepar3D® Software Engineer Sr.
pine-nut
Posts: 7
Joined: Sat May 27, 2023 10:07 am

Re: SimpleAirplane, SetCrashMode and reload?

Post by pine-nut »

Clifton Crane wrote: Wed Jul 26, 2023 11:07 am Hello,

Try calling SetCrashMode in your Simulate callback and passing in the provided delta time. The crash state will reset after a period of time and reload your last scenario.

Regards,
Clifton
Yes, it worked! Thanks so much! It can't reload the last scenario because SetCrashMode is written in the condition: "if (IsNormalMode())".
Post Reply