Hi All,
Using P3d as an Image generator I have been trying to set time of day to have a night and day scenario.
Using the following based on others before me
SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_CLOCK_HOUR, "ZULU_HOURS_SET");
SimConnect_AddClientEventToNotificationGroup(hSimConnect,GROUP_1, EVENT_CLOCK_HOUR, FALSE);
SimConnect_SetNotificationGroupPriority(hSimConnect, GROUP_1, SIMCONNECT_GROUP_PRIORITY_STANDARD-1);
and
SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_CLOCK_HOUR ,hour_variable ,GROUP_1, SIMCONNECT_EVENT_FLAG_DEFAULT);
This didn't work and I tried all sorts of variations and still nothing.
It then occurred to be that as I was calling this from an external Sim dll module, loaded when a specific vehicle was loaded, it might not work .
Trying the above as a p3d client loaded via exe.xml or manually it worked fine.
However I would like to keep the number of intefaces to P3d down so I am wondering if there is anything I was doing wrong in the external Sim module that stopped me setting time ?
Any insight would be appreciated.
Cheers ,Pete
Setting Simulation Time (again)
Did you try a higher group priority?
MapClientEventToSimEvent(Events.SET_SIM_TIME_HOURS, "ZULU_HOURS_SET");
TransmitClientEvent(SIMCONNECT_OBJECT_ID_USER, Events.SET_SIM_TIME_HOURS, (uint)SimTime.Hour, SimConnectGroupPriorities.SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
MapClientEventToSimEvent(Events.SET_SIM_TIME_HOURS, "ZULU_HOURS_SET");
TransmitClientEvent(SIMCONNECT_OBJECT_ID_USER, Events.SET_SIM_TIME_HOURS, (uint)SimTime.Hour, SimConnectGroupPriorities.SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);