No categories assigned

LUA:GetTarget

Revision as of 19:16, 11 September 2013 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: GetTarget() = Gets the target of the given spawn ==== Syntax ==== var = GetTarget(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn) : ''param1'' i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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