# Working with AI objects

Create and manage objects external to the aircraft. Aircraft and objects are available for creation.

# Creating and destroying objects

Objects must first be registered with MSFS before being created.

Create an object using create_object. You'll pick a name which is how you reference the object while it exists (to update its properties and then later remove it), and also a title which is the name that comes from aircraft.cfg or sim.cfg.

Remove an object when you are finished by using destroy_object. If you don't destroy objects, they will be cleaned up when the mission eventually ends.

Examples:

{"create_object":{
  "name": "my_object",
  "title": "HPG Airbus H145 Ambulance",
  "location": "$USER"
}},
{"sleep":60},
{"destroy_object": "my_object"}

# Object properties

Set properties on objects to configure them.

VAR 1 often is configured to set the animation state for the object.

Examples:

{"set": {"object": "my_object", "var":"MODE"}, "value": 1}

# Move objects

Use move_object to instantly change the position and orientation of an object.

# Object waypoint navigation

Use drive_object to send an object along a series of waypoints at a specific speed.

# Flying objects

TODO

# Creating third party object packs

Read the Legacy Documentation (PDF).