Difference between revisions of "LUA:SetHP"
(Created page with "= LUA Functions: SetHP() = Sets the given spawns HP to the given value ==== Syntax ==== SetHP(param1, param2) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''param2''...") |
(No difference)
|
Latest revision as of 22:58, 11 September 2013
LUA Functions: SetHP()
Sets the given spawns HP to the given value
Syntax
SetHP(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (sint32)
- param1 is the spawn who's HP we want to set
- param2 is the value we want to set the HP to
Usage
function hailed(NPC, Spawn)
local hp = GetMaxHP(Spawn) * 0.5
SetHP(Spawn, hp)
end
When the NPC is hailed the players HP will be set to 50%