Difference between revisions of "LUA:GetFollowTarget"

(Created page with "= LUA Functions: GetFollowTarget() = Gets the spawn that the current spawn is following ==== Syntax ==== GetFollowTarget(param1) ==== Parameters ==== ; Required - ''param1'' ...")
 
(No difference)

Latest revision as of 20:44, 23 May 2013

LUA Functions: GetFollowTarget()

Gets the spawn that the current spawn is following


Syntax

GetFollowTarget(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn to check


Usage

function hailed(NPC, Spawn)
    follow_target = GetFollowTarget(NPC)
    if follow_target ~= nil then
        Say(NPC, "I am following " .. GetName(follow_target) .. ".")
    end
end

When hailed, the spawn will respond saying who they are following, if they are following any one.