1
0
EQ2Emu/docs/lua_functions/GetFollowTarget.md

619 B
Raw Blame History

Function: GetFollowTarget(Spawn)

Description: Retrieves the current follow target of a given NPC or pet. If the spawn is following someone, this returns the entity being followed.

Parameters:

  • spawn (Spawn) Spawn object representing NPC (or players pet) that might be following a target.

Returns: Spawn The entity that Spawn is currently following, or nil if its not following anyone.

Example:

-- Example usage (check who an escort NPC is following)
local leader = GetFollowTarget(EscortNPC)
if leader == Player then
    Say(EscortNPC, "I am right behind you!")
end