Difference between revisions of "LUA:Interrupt"
John adams (talk | contribs) (Created page with "= LUA Functions: Interrupt() = Interrupts casting of target ==== Syntax ==== Interrupt(param1, param2) ==== Parameters ==== ; Required - ''param1'' (Spawn), ''param2'' (Spawn...") |
|||
| Line 1: | Line 1: | ||
= LUA Functions: Interrupt() = | = LUA Functions: Interrupt() = | ||
| − | Interrupts casting of | + | Interrupts casting of a spawn. If the spawn param is not set and this is used in a spellscript, this will interrupt all spell targets. |
| Line 8: | Line 8: | ||
==== Parameters ==== | ==== Parameters ==== | ||
| − | ; Required - ''param1 | + | ; Required - ''param1'' (Spawn) |
| − | : ''param1'' is the caster of the | + | : ''param1'' is the caster of the interrupt |
| − | : ''param2'' is the target of the | + | ; Optional - ''param2'' (Spawn) |
| + | : ''param2'' if used is the target of the interrupt, otherwise all spell targets will be interrupted. | ||
| Line 19: | Line 20: | ||
<pre> | <pre> | ||
function cast(Caster, Target) | function cast(Caster, Target) | ||
| − | + | Interrupt(Caster, Target) | |
| − | |||
| − | |||
end | end | ||
</pre> | </pre> | ||
This script will cause the caster to interrupt a Target who is casting a spell or ability. | This script will cause the caster to interrupt a Target who is casting a spell or ability. | ||
Latest revision as of 20:56, 17 March 2014
LUA Functions: Interrupt()
Interrupts casting of a spawn. If the spawn param is not set and this is used in a spellscript, this will interrupt all spell targets.
Syntax
Interrupt(param1, param2)
Parameters
- Required - param1 (Spawn)
- param1 is the caster of the interrupt
- Optional - param2 (Spawn)
- param2 if used is the target of the interrupt, otherwise all spell targets will be interrupted.
Note: Either of these can be the Player or NPC, since NPCs can interrupt player casting as well.
Usage
function cast(Caster, Target)
Interrupt(Caster, Target)
end
This script will cause the caster to interrupt a Target who is casting a spell or ability.