No categories assigned

LUA:SetTarget

Revision as of 16:13, 28 August 2013 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: AddHate() = Adds hate to ''param2'' from ''param1'' ==== Syntax ==== AddHate(param1, param2, param3) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: AddHate()

Adds hate to param2 from param1


Syntax

AddHate(param1, param2, param3)


Parameters

Required - param1 (Spawn), param2 (Spawn), param3 (sint32)
param1 is the spawn that is adding hate
param2 is the spawn recieving the hate
param3 is the amount of hate to add

Usage

function cast(Caster, Target)
    -- Add 50 hate to the target
    AddHate(Caster, Target, 50)
end

This is a simple taunt spell that adds 50 hate to the target.

Notes

If this is called from a spell script then the target/targets will be determined by the spell data(encounter AE, true AE, single target, etc...), the param is still required though.