Hello,
I try to understand the example of AIObject. But I am confused by the following things
1. When the AIObject connects to the simulator, it seems the client receives an event "SIMCONNECT_RECV_ID_EVENT". Then the first event must be "EVENT_SIM_START". Its handler must enable the user inputs. Is that true?
2. When the user is setting up the objects, function SimConnect_AICreateNonATCAircraft/AICreateSimulatedObject is called. A request ID is passed into the function as an argument, such as REQUEST_BELL, REQUEST_BALLOON1, etc.
3. The next step is the most confusing to me. When the user is sending the plans for created objects, it seems that funciton SimConnect_SetDataOnSimObject already knows the plan is given to which object. But I do not see (in the funciton call) the request ID, used in creating objects. What I do see is an Object ID, such as MooneyID or TruckID. My understanding is that after an object is created, the simulator sends another event, SIMCONNECT_RECV_ID_ASSIGNED_OBJECT_ID. In the handler, I see the request IDs and the Object IDs are associated. Is that correct?
4. The last question is whether it is possible to real-time change the position of an object. I notice that there is a function, SimConnect_RequestDataOnSimObject, requests data of objects every some time. Is that possible to use this function to generate events to let the client handle so that the client can alter the position of objects.
Thanks,
guodah
I try to understand the example of AIObject. But I am confused by the following things
1. When the AIObject connects to the simulator, it seems the client receives an event "SIMCONNECT_RECV_ID_EVENT". Then the first event must be "EVENT_SIM_START". Its handler must enable the user inputs. Is that true?
2. When the user is setting up the objects, function SimConnect_AICreateNonATCAircraft/AICreateSimulatedObject is called. A request ID is passed into the function as an argument, such as REQUEST_BELL, REQUEST_BALLOON1, etc.
3. The next step is the most confusing to me. When the user is sending the plans for created objects, it seems that funciton SimConnect_SetDataOnSimObject already knows the plan is given to which object. But I do not see (in the funciton call) the request ID, used in creating objects. What I do see is an Object ID, such as MooneyID or TruckID. My understanding is that after an object is created, the simulator sends another event, SIMCONNECT_RECV_ID_ASSIGNED_OBJECT_ID. In the handler, I see the request IDs and the Object IDs are associated. Is that correct?
4. The last question is whether it is possible to real-time change the position of an object. I notice that there is a function, SimConnect_RequestDataOnSimObject, requests data of objects every some time. Is that possible to use this function to generate events to let the client handle so that the client can alter the position of objects.
Thanks,
guodah




