The destroyNamedEntity native AI script function is used to destroy a named entity.
()destroyNamedEntity(name: s) // destroyNamedEntity_s_
()destroyNamedEntity("Invasion");
This example code calls the destroyNamedEntity function with the name "Invasion", destroying the named entity with that name.