Difference between revisions of "VESSEL2::clbkSaveState"

From OrbiterWiki
Jump to navigation Jump to search
 
(Added category.)
 
Line 26: Line 26:
  
 
{{VESSEL2}}
 
{{VESSEL2}}
 +
[[Category: Articles]]
 
[[Category:OrbiterSDK|VESSEL2::clbkSaveState]]
 
[[Category:OrbiterSDK|VESSEL2::clbkSaveState]]
 
[[Category:VESSEL2|clbkSaveState]]
 
[[Category:VESSEL2|clbkSaveState]]
 
[[Category:Callback functions]]
 
[[Category:Callback functions]]

Latest revision as of 12:07, 16 October 2022

Save the current state of the vessel in a scenario file.

Syntax[edit]

void clbkSaveState(FILEHANDLE scn )

scn
File handle to the currently opened scenario file.

Examples[edit]

void MAYFLY::clbkSaveState(FILEHANDLE scn)
{
	SaveDefaultState(scn);
	if(fRemainingLifeTime > 0.0)
	{
		oapiWriteScenario_float(scn, "LIFETIME", fRemainingLifeTime);
	}
}

See also[edit]

Callback functions in VESSEL2

edit

clbkADCtrlMode - clbkAnimate - clbkConsumeBufferedKey - clbkConsumeDirectKey - clbkDockEvent - clbkDrawHUD - clbkHUDMode - clbkLoadGenericCockpit - clbkLoadPanel - clbkLoadStateEx - clbkLoadVC - clbkMFDMode - clbkNavMode - clbkPanelMouseEvent - clbkPanelRedrawEvent - clbkPostCreation - clbkPostStep - clbkPreStep - clbkRCSMode - clbkSaveState - clbkSetClassCaps - clbkSetStateEx - clbkVCMouseEvent - clbkVCRedrawEvent - clbkVisualCreated - clbkVisualDestroyed