| Envrioment:
|
Server
|
|
|
| Function:
|
onSimulationFrame
|
Added with: 2.5.0
|
|
|
| Member Of:
|
hook
|
| Syntax:
|
nothing hook.onSimulationFrame( )
|
| Description:
|
Occurs constantly as the simulation is running. This function runs extremely fast, several hundred times a second. It is highly recommended to put in checks to limit how often code can run from this function.
|
|
|
| Return Value:
|
nothing
|
| Return Actions:
|
|
|
|
| Examples:
|
Runs whatever code you want at an interval of 10 seconds.
local lTime = DCS.getModelTime()
function myCall.onSimulationFrame()
if lTime + 10 < DCS.getModelTime() then
lTime = DCS.getModelTime()
-- whatever code you want
end
end
|
| Related Functions:
|
List of Callbacks: onMissionLoadBegin, onMissionLoadProgress, onMissionLoadEnd, onSimulationStart, onSimulationStop, onSimulationFrame, onSimulationPause, onSimulationResume, onGameEvent, onNetConnect, onNetMissionChanged, onNetConnect, onNetDisconnect, onPlayerConnect, onPlayerDisconnect, onPlayerStart, onPlayerStop, onPlayerChangeSlot, onPlayerTryConnect, onPlayerTrySendChat, onPlayerTryChangeSlot
|
| Notes:
|
|