Difference between revisions of "LUA:GetTarget"

(Created page with "= LUA Functions: GetTarget() = Gets the target of the given spawn ==== Syntax ==== var = GetTarget(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn) : ''param1'' i...")
 
(No difference)

Latest revision as of 19:16, 11 September 2013

LUA Functions: GetTarget()

Gets the target of the given spawn


Syntax

var = GetTarget(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn who's target we want to get


Usage

function hailed(NPC, Spawn)
    Say(NPC, "You have " .. GetName(GetTarget(Spawn)) .. " targeted")
end

The NPC will respond with the name of the players target

Notes

Returns a spawn