DoCombatSpellApply - Actor

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

Adds the specified spell to the target actor from this one as the caster. Use this instead of AddSpell to apply a spell in combat so that die rolls and other appropriate events can occur (such as applying a disease through a spell).

If you want an actor to hit another actor with a spell (regardless of where they are on the battlefield), use this in combination with a Target Actor spell (range doesn't matter).

Syntax[edit | edit source]

Function DoCombatSpellApply(Spell akSpell, ObjectReference akTarget) native

Parameters[edit | edit source]

  • akSpell: The spell that this actor applies to the target reference during combat.
  • akTarget: The target of the spell.

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Have the wizard apply the super spell to the target
Wizard.DoCombatSpellApply(SuperSpell, UnluckyTarget)

See Also[edit | edit source]