The ActionCastSpellAtLocation()
NWScript command causes the caller to cast the indicated spell at the indicated location.
In order to cause a different object (creature or placeable) to cast the spell, this command must be assigned via AssignCommand()
.
Definition[]
void ActionCastSpellAtLocation (int nSpell, location lTargetLocation
,
int nMetaMagic=METAMAGIC_ANY, int bCheat=FALSE
,
int nProjectilePathType=PROJECTILE_PATH_TYPE_DEFAULT, int bInstantSpell=FALSE
)
int nSpell
- A SPELL_* constant (integer) indicating the spell to cast.
location lTargetLocation
- The location at which the spell will be cast.
int nMetaMagic
- A METAMAGIC_* constant indicating which metamagic feat should be applied to this casting. (Only one feat is allowed.)
int bCheat
- If set to TRUE, the caster need not be able to cast this spell normally and a spell slot will not be consumed.
int nProjectilePathType
- A PROJECTILE_PATH_TYPE_* constant influencing the spell's projectile visual effect.
int bInstantSpell
- If set to TRUE, the spell will be cast instantly (with no animations). This is intended to allow the simulation of a high-level caster who had time to prepare for hostile player characters.
There have been reports of the nMetaMagic
parameter being ignored by this command.