TODO: cargo-selection cancellation is engine-native and its parameter/return contract is not exposed by installed scripts.
Removes the object from the mission. Once destroyed, the object reference must not be used for further operations.
Nothing.
Returns the attributes table directly from the object's descriptor.
DCS returns nil when the descriptor has no attributes table.
Attribute-name map, or undefined when the object has no attributes.
Returns the object's exact mission name.
Object name.
Returns position and orientation; p is position and x/y/z are unit axes.
World transform.
Returns the internal DCS database type name.
Type name.
Tests whether the object's descriptor contains an attribute whose value
is exactly true. Attribute names are DCS database strings such as
"Air", "Ground Units", or "Ships".
DCS database attribute name to test.
true only when the descriptor contains that attribute with the value true.
const unit = Unit.getByName("Target");
if (unit?.hasAttribute("Air Defence")) {
env.info("Target is an air-defence unit");
}
Reports whether the object is airborne.
In-air state.
Reports whether the object still exists in the simulation.
Existence state.
Version
2.9.29.27468