Scriptname aaaTKCFollowingArrowScript extends activemagiceffect  

Activator Property FXEmptyActivator Auto
spell Property shot Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)

Actor player = Game.GetPlayer()

float Distance = 100
float Degrees = 25

ObjectReference BoxR
ObjectReference BoxL
float LocZ

BoxR	= player.placeAtMe(FXEmptyActivator)
BoxL 	= player.placeAtMe(FXEmptyActivator)

float RAngle= player.GetAngleZ() + Degrees
float RLocX = Distance * math.sin(RAngle)
float RLocY = Distance * math.cos(RAngle)

float LAngle = player.GetAngleZ() - Degrees
float LLocX = Distance * math.sin(LAngle)
float LLocY = Distance * math.cos(LAngle)

BoxR.MoveTo(player, RLocX, RLocY, 100)
BoxL.MoveTo(player, LLocX, LLocY,100)

shot.RemoteCast(BoxR, player,akTarget)
Utility.Wait(0.01)
shot.RemoteCast(BoxL, player,akTarget)

BoxR.Delete()
BoxL.Delete()

endEvent