Difference between revisions of "LUA:GetArchetypeName"

(Created page with "== LUA Functions: GetArchetypeName(Spawn) == Returns the string value of a spawn's archetype. Example, if used on a spawn with the adventure class "Assassin" will return the stri...")
 
(No difference)

Latest revision as of 14:02, 19 July 2013

LUA Functions: GetArchetypeName(Spawn)

Returns the string value of a spawn's archetype. Example, if used on a spawn with the adventure class "Assassin" will return the string value "Scout".

Back to LUA Functions Index


Syntax

GetArchetypeName(Spawn)


Usage

 function hailed(NPC, Spawn)
   Say(NPC, "Your archetype is " .. GetArchetypeName(Spawn) .. "!")
 end

This makes the NPC respond to the player who hails it with the player's archetype.