actors.destroy
Destroys an actor through K2_DestroyActor.
Syntax
ue.actors.destroy(actor: ActorReference) -> boolean?, string?Parameters
| Parameter | Type | Description |
|---|---|---|
actor | ActorReference | String query or actor descriptor. |
Returns
| Type | Description |
|---|---|
true | Destroy call succeeded. |
nil, string | Actor lookup or reflected call failed. |
Example
local crate = ue.actors.find({ query = "BP_Crate_C", limit = 1 })[1]
if crate then
ue.actors.destroy(crate)
end