Difference between revisions of "LUA:AddCharacterTitle"

m (Edited for simplicity)
Line 8: Line 8:
 
|Example =
 
|Example =
 
<pre>
 
<pre>
function hailed(NPC, Spawn)
+
function hailed(NPC, Player)
AddCharacterTitle(Spawn, "Orc Killer")
+
AddCharacterTitle(Player, "Orc Killer")
 
end
 
end
 
</pre>
 
</pre>

Revision as of 07:21, 7 February 2022


LUA:AllFunctions - AddCharacterTitle

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Adds a character title to a spawn if not already present

Syntax

AddCharacterTitle(param1, param2)

Parameters

Required - param1 (Spawn), param2 (string)
param1 is the spawn we want to add a title to.
param2 is the title we want to give the spawn.


Example

function hailed(NPC, Player)
	AddCharacterTitle(Player, "Orc Killer")
end

An NPC with this script will give the player the title of Orc Killer

Notes

Can be used on a player or a NPC