Cast - Spell

Revision as of 11:49, 3 December 2015 by imported>Plplecuyer
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: Spell Script

Casts this spell from the specified object reference, optionally toward a target object reference.

SyntaxEdit

Function Cast(ObjectReference akSource, ObjectReference akTarget = None) native

ParametersEdit

  • akSource: The ObjectReference from which to cast the spell. The source must be able to cast this spell.
  • akTarget: An optional ObjectReference at which to aim the spell. If None is passed and the spell needs a direction, it will be aimed in a default direction.
    • Default: None

Return ValueEdit

None.

NotesEdit

  • This function casts the spell instantaneously. This is mainly desirable only for non-actors, because it will not animate an actor. For instance, the spell will be cast even if the actor's hands are not readied.
  • If you wish to make an actor cast a spell using all the normal spellcasting behaviors, please instead use an AI package that includes the UseMagic procedure.
  • Actor races can be set to cast magic only in the direction that the actor is facing; if the source is an actor with this racial setting, the target will be ignored.

See AlsoEdit