No categories assigned

LUA:SetInCombat

Revision as of 17:25, 28 August 2013 by Jabantiz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: SetInCombat()

Sets the given spawns combat state


Syntax

SetInCombat(param1, param2)


Parameters

Required - param1 (Spawn), param2 (bool)
param1 is the spawn who's combat state we want to change
param2 true if you want to put the spawn in combat, false if you want to take the spawn out of combat

Usage

function hailed(NPC, Spawn)
    SetInCombat(NPC, true)
end

This will cause the spawn to enter combat mode when it is hailed

Notes

When putting the spawn into combat it will kill any scripted movement it has and won't resume it until combat is toggled off.