set_actor_lifetime
Schedule an actor to self-destruct after the specified seconds and reset any previous timer, enabling automatic cleanup of temporary effects.
Instructions
Schedules an actor in the active world (a running PIE/game world if one exists, otherwise the editor world) for automatic destruction after N seconds via FTimerManager::SetTimer. Idempotent: re-running cancels the previous timer and resets the countdown. Used for transient effects (damage numbers, FX) that should auto-cleanup. Runtime/cooked-build safe: resolves the world via GEngine's world contexts, not GEditor, so it also works in packaged builds.
Returns: { actor_name: string, seconds: number, scheduled: bool, replaced_previous_timer: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seconds | Yes | Seconds until the actor is destroyed (required, >0) | |
| actor_name | Yes | Display label or internal name of the target actor (required) |