1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Receiving mission events

Discussion in 'SimConnect' started by Hubi, 14/5/07.

  1. Hubi

    Hubi

    Joined:
    7/5/07
    Messages:
    1
    Country:
    germany
    Hello,

    does anybody know how to receive mission events like trigger, dialogs... with simconnect?

    The following C# code seems to do nothing at all:

    Code:
    simconnect.OnRecvCustomAction += new SimConnect.RecvCustomActionEventHandler(simconnect_OnRecvCustomAction);
    
    simconnect.MapClientEventToSimEvent(EVENTS.EVENT_MISSION_ACTION, "EVENT_MISSION");
    
    simconnect.AddClientEventToNotificationGroup(NGROUP.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.
  2. RalphLear

    RalphLear

    Joined:
    8/1/11
    Messages:
    3
    Country:
    germany
    I too am having this problem

    Hi,
    did you ever figure this one out?. I too am unable to receive my Custom Action Events. Everything else works fine.
  3. RalphLear

    RalphLear

    Joined:
    8/1/11
    Messages:
    3
    Country:
    germany
    Got it!

    simconnect.SubscribeToSystemEvent(EVENTS.EVENT_MISSION_ACTION, "CustomMissionActionExecuted");
    simconnect.OnRecvCustomAction += new SimConnect.RecvCustomActionEventHandler(simconnect_OnRecvCustomAction);


    That all thats needed.

Share This Page