No categories assigned

LUA:Interrupt

Revision as of 10:41, 3 August 2013 by John adams (talk | contribs) (Created page with "= LUA Functions: Interrupt() = Interrupts casting of target ==== Syntax ==== Interrupt(param1, param2) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''param2'' (Spawn...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: Interrupt()

Interrupts casting of target


Syntax

Interrupt(param1, param2)


Parameters

Required - param1 (Spawn), param2 (Spawn)
param1 is the caster of the entity command
param2 is the target of the entity command


Note: Either of these can be the Player or NPC, since NPCs can interrupt player casting as well.


Usage

function cast(Caster, Target)
    if target ~= nil then
        Interrupt(Caster, Target)
    end
end

This script will cause the caster to interrupt a Target who is casting a spell or ability.