Hubi
14 May 2007, 11:43
Hello,
does anybody know how to receive mission events like trigger, dialogs... with simconnect?
The following C# code seems to do nothing at all:
simconnect.OnRecvCustomAction += new SimConnect.RecvCustomActionEventHandler(simconnect _OnRecvCustomAction);
simconnect.MapClientEventToSimEvent(EVENTS.EVENT_M ISSION_ACTION, "EVENT_MISSION");
simconnect.AddClientEventToNotificationGroup(NGROU P.EVENT_GROUP, EVENTS.EVENT_MISSION_ACTION, false);
void simconnect_OnRecvCustomAction(SimConnect sender, SIMCONNECT_RECV_CUSTOM_ACTION data)
{
Guid nummer = new Guid("{388B86F0-D051-45C4-8718-B6256DDFDD4D}");
if (data.guidInstanceId ==nummer)
bremse.Text = "Event received";
}
Is there an error (of course there is :confused: )? Has anybody suggestions or having a working snippet?
Thanks.
does anybody know how to receive mission events like trigger, dialogs... with simconnect?
The following C# code seems to do nothing at all:
simconnect.OnRecvCustomAction += new SimConnect.RecvCustomActionEventHandler(simconnect _OnRecvCustomAction);
simconnect.MapClientEventToSimEvent(EVENTS.EVENT_M ISSION_ACTION, "EVENT_MISSION");
simconnect.AddClientEventToNotificationGroup(NGROU P.EVENT_GROUP, EVENTS.EVENT_MISSION_ACTION, false);
void simconnect_OnRecvCustomAction(SimConnect sender, SIMCONNECT_RECV_CUSTOM_ACTION data)
{
Guid nummer = new Guid("{388B86F0-D051-45C4-8718-B6256DDFDD4D}");
if (data.guidInstanceId ==nummer)
bremse.Text = "Event received";
}
Is there an error (of course there is :confused: )? Has anybody suggestions or having a working snippet?
Thanks.