Jump to content

Casting a spell from an alternate point


harx01

Recommended Posts

alright, not deleting this post. This script compiles, but im not sure if its doing the right thing. If it is, the spell isnt casting.

 

My problem might be the spell and magic effect setup. I set the magic effect Archtype to script, but am i able to set the 'Casting Type' as something other than Actor Target? I would like the option of it hitting the target location, would this script do that or is it limited to targets?

 

Im trying to get the spell to cast from above the targets head.

 

 

 

Scriptname skyspellTarget extends ActiveMagicEffect

 

Spell Property SpellRef Auto

ObjectReference CastPosRef

 

Event OnEffectStart(Actor akTarget, Actor akCaster)

 

 

CastPosRef.SetPosition(akTarget.GetPositionX(), akTarget.GetPositionY(), akTarget.GetPositionZ() + 900)

 

 

;thespell--

 

utility.wait(2.5)

SpellRef.Cast(CastPosRef, akTarget)

 

endEvent

 

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...