This is what I have so far. It doesn't work. I tried several variations of this.
Scriptname ESG_ShrapnelBlast extends activemagiceffect Spell Property Shrapnel AutoSpell Property Blast AutoInt Property NumShards AutoActivator Property Marker AutoObjectReference[] MarkerArrayInt SetupCount = 0Int FragmentsFired = 0ObjectReference SourceInt MarkersDeletedEvent OnEffectFinish(Actor Target, Actor Caster) MarkerArray = new ObjectReference[10] While (SetupCount < NumShards) MarkerArray[SetupCount] = Target.PlaceAtMe(Marker) MarkerArray[SetupCount].MoveTo(Target, (100 * (0.5 - Utility.RandomFloat())), (100 * (0.5 - Utility.RandomFloat())), (50 * Utility.RandomFloat())) SetupCount += 1 EndWhile Source = Target.PlaceAtMe(Marker) Source.MoveTo(Target, 0, 0, 10) Blast.RemoteCast(Source, Caster) While (FragmentsFired < NumShards) Shrapnel.RemoteCast(Source, Caster, MarkerArray[FragmentsFired]) FragmentsFired += 1 EndWhile While MarkersDeleted < NumShards MarkerArray[MarkersDeleted].DisableNoWait() MarkerArray[MarkersDeleted].DisableNoWait() MarkersDeleted += 1 EndWhile Source.DisableNoWait() Source.Delete()EndEvent
One version, I tried using the target as the source of the projectiles. This didn't work, because most NPCs ignore the "target" parameter for remotecast and only fire in the direction they are facing, so most of the time they would just shoot all the projectiles straight up or straight down as this script is attached to a paralysis effect.
Another version, I didn't offset the "source" activator, and so the target ended up getting hit by every single ice shard (killing it most of the time) so none of them flew out and hit other targets.
There is also a problem where if the NPC dies due to this effect, their corpse doesn't go into ragdoll mode, instead they just stand there like they are about to attack but they are still a corpse.
