PDA

View Full Version : Getting info on AI objects from IVAO


oliver_mpt
13 Mar 2008, 15:08
Hello,

I'm trying to get info from traffic injected by IVAP, the IVAO pilot client software.
The IVAP developers told me they create objects with "SimConnect_AICreateNonATCAircraft".

On my side, I collect info on AI traffic using the ObjectAdded / ObjectRemoved. I filter the object by type with

if ((evt->eObjType == SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT) || (evt->eObjType == SIMCONNECT_SIMOBJECT_TYPE_HELICOPTER)){

Most of the time I don't catch the objects created by IVAP (but randomly, a few of them, yes).

Anybody has an idea on how to detect AI traffic created with "SimConnect_AICreateNonATCAircraft" ?

Regards

Olivier

ronh
14 Mar 2008, 22:16
Olivier,

A shot in the dark. Have you set the STATE of the system event to on.

Some are off by default.

hr = SimConnect_SubscribeToSystemEvent(hSimConnect, EVENT_AI_ADD, "ObjectAdded");

// The recurring events will be on by default

hr = SimConnect_SetSystemEventState(hSimConnect, EVENT_AI_ADD, SIMCONNECT_STATE_ON);

where EVENT_AI_ADD is one of your events to trigger the map to "ObjectAdded" system event.

Sounds like you are doing things right. Perhaps you are missing events due to processing the other system events.

Have you tried the simconnect.ini

console=yes to see if you can spot any messages you miss.