Background for Skyrim SE
Member of the Actor script
voidfunctionDoCombatSpellApply(SpellakSpell, ObjectReferenceakTarget)Native

Description

Wiki Description

Adds the specified Spell to the target actor from this one as the caster. Use this instead of Actor.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).

Documentation Comment

Apply a spell to a target in combat


Parameters

  1. SpellakSpell

    CK Wiki Description

    The Spell that this actor applies to the target reference during combat.

  2. ObjectReferenceakTarget

    CK Wiki Description

    The target of the spell.


Examples

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

Auto-Generated Example

Spell mySpell__akSpell
ObjectReference myObjectReference__akTarget

myActor__toCallFunctionOn.DoCombatSpellApply(mySpell__akSpell, myObjectReference__akTarget)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.