When Following Starts
Fires when this object starts following its target.
Introduction
When Following Starts is an event in the Follower group of World Events. It fires when this object starts following its target. When it fires, the event hands one value to your script: Object, the target being followed. When the follower is chasing a player, this value represents that character. 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. Every journey starts with a first step: this event opens the follow, When Reaching Target celebrates the arrival, and When Target is Lost handles the companion falling behind. Speed, distance, and formations are configured in the Follower guide. When Following Starts event in the World Editor Image The When Following Starts event in the Script Editor. caption
Parameters
Object the target the follower started chasing; it is the character when chasing a player Parameter Description
How to Access
How to Access - Event When Following Starts
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 Following Starts 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 watch the object start following its target, then check that the actions run.
Example
When following starts by Object in Event: Execute Object in Event, Character.Controlling Player.Player.Play Audio, Volume 100 when-following-starts-example.png Plays an audio at volume 100 when the follower starts following. caption
Common Uses
Play a start sound or animation when the pet begins to follow Show a message that a companion has joined the player Lock a door or start a chase once the follower starts moving
Tip
Great as a trigger for enemy AI: use it to start chase music or chase behavior.