VESSEL2::clbkSaveState

From OrbiterWiki
Jump to navigation Jump to search

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