NWNWiki
NWNWiki
3,719
pages

The ActionCastSpellAtObject() NWScript command causes the caller to cast the indicated spell at the indicated object. In order to cause a different object (creature or placeable) to cast the spell, this command must be assigned via AssignCommand().

Definition[]

void ActionCastSpellAtObject (int nSpell, object oTarget,
int nMetaMagic=METAMAGIC_ANY, int bCheat=FALSE,
int nDomainLevel=0, int nProjectilePathType=PROJECTILE_PATH_TYPE_DEFAULT,
int bInstantSpell=FALSE)

int nSpell
A SPELL_* constant (integer) indicating the spell to cast.
object oTarget
The object 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. In addition, metamagic will be ignored.
int nDomainLevel
Unused.
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.

See also[]