First set up a chain of XMarkers as linked refs in the direction you want the spell's terminus to be at. So, if I want a rotating stream of fire (the example I will be making herein) I would make a circular chain of xmarkers at the edges of the room it is in. Now add one more XMarker, but don't link it to anything (yet).
This last XMarker should have the following script attached to its reference (NOT the base object)
Scriptname PCKP_Script_FollowTracks extends ObjectReferenceObjectReference Property FirstLink autoObjectReference OldLinkevent OnLoad()OldLink = FirstLinkTranslateToRef(OldLink, afSpeed = 256)endEventevent OnTranslationAlmostComplete()OldLink = OldLink.GetLinkedRef()TranslateToRef(OldLink, afSpeed = 256)endEvent
Make the speed whatever you want, I think 256 is pretty good.
Now go find InvisibleNPC in the actors. Open him up and first change his FormID such that when we finish up it will make a new form. Then go to his inventory and take away his weapon. Then go to AI Data and set him to Unagressive. Finally (and this is where it gets tricky) add a package to him. This will be a UseMagic package with the following properties:
HoldWhenBlocked = False
CastTimeMin 9999
CastTimeMax 10000
Target Linked Reference
Location At editor location, radius 10 or so
MinNumToCast 999
MaxNumToCast 10000
CooldownTimeMin 0
CooldornTimeMax 0
Spell - any concentration spell
Now just link it to the xmarker with the script, et voila!
The one weakness of this method is that the actor, while invisible, is not collisionless. I'm working on a different way of doing it that may or may not work. We'll see.