When Target Lost
Fires when this object loses its target and can no longer follow it.
Introduction
When Target Lost is an event in the Follower group of World Events. It fires when this object loses its target and can no longer follow it. In guardian follow mode this event also fires when the object itself leaves the guarding distance. Like every event, it does nothing by itself. It waits for the right moment, then runs all the actions connected to it. This event belongs to the Follower component. Open the Follower component guide to see everything the component itself can do. Losing the target is the sad ending of a follow: it pairs with When Following Starts and When Reaching Target to cover the whole journey - start, arrival, and losing the trail. Configure search radius and retry behavior in the Follower guide. When Target Lost event in the World Editor Image The When Target Lost event in the Script Editor. caption
Parameters
Object the target the follower lost Parameter Description
How to Access
How to Access - Event When Target Lost
How to Use
Select the object, press Propertie (the blue equalizer icon) in the bottom action menu, and scroll to the bottom of the properties panel. Press Add Component and pick the Follower component; its block stacks below the existing properties with the When Target Lost event inside it. Press the + button below the event to add a script, then press Edit on that script to open the script editor and build the actions that should run when the event fires. Press Play and remove the target and watch the object stop, then check that the actions run.
Example
When target lost by Object in Event: Execute System, Environment.3D Bubble show Target Lost when-target-lost-example.png Shows a 3D bubble text saying Target Lost when the follower loses its target. caption
Common Uses
Show a 3D bubble text saying the target is lost Stop background music or cancel the chase Teleport the follower back to its spawn point
Tip
Guardian mode adds a second way to lose a target: stepping outside the guarding distance fires this event too, not only losing sight of the target.