Create AI Object
msfs_create_ai_objectCreate an AI aircraft or object in MSFS at specified coordinates, heading, airspeed, and altitude. Use to set up traffic or collision-avoidance test scenarios.
Instructions
Spawn an AI aircraft or object at a position.
Useful for building traffic or collision-avoidance test scenarios. The
title must match an installed aircraft exactly. When it does, SimConnect
confirms the object was actually created with an ASSIGNED_OBJECT_ID
reply, and object_id on the result carries it -- also the id
SimConnect_AIRemoveObject would need to remove it again. When the title
matches nothing installed, MSFS ignores the request silently: no error,
no reply, so object_id stays null. Treat that null as "not confirmed
to exist," not as a definite failure of this call -- a request registry
being briefly slow to answer, or a connection with none at all (the
plain SimConnect fallback), leaves the same null for a different reason;
see message for which applies.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Exact aircraft or object title as MSFS knows it, e.g. 'Boeing 747-8i Asobo' | |
| heading | No | Heading in degrees true | |
| airspeed | No | Airspeed in knots | |
| latitude | Yes | Latitude | |
| longitude | Yes | Longitude | |
| on_ground | No | Place the object on the ground | |
| altitude_ft | No | Altitude in feet |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |