Basically this can be applied to any form that can have a script attached. But for the sake of description, I'm doing it on an activator. Basically what I was trying to achieve was adding a fear effect to one of my impaled warning in 'http://www.nexusmods.com/skyrim/mods/59340/?'. The effect will be, that anyone that comes to close to the detterence will run away in fear when seeing the piked corpse. First we need an activator, any form of activator that you like. Then we need the following:
The projectile
1. make a copy of the projectile form: IllusionNeg01Projectile
2. set the light to none, speed to 3000.0 and click the supersonic option...also set the detection sound level to silent
3. next make a copy of the mesh: Magic\IllusionNegProjectile01.nif
4. rename the mesh and put it into a folder of your choice, preferably a folder that you can find easy in the CK
5. now find all the BSEffectShaderProperty and set all color variables (EmissiveColor) to 0.0 including the alpha channel so the projectile can't be seen later in game
6. now add this mesh to your custom projectile
The Magic Effect
1. make a copy of the magic effect: InfluenceConfDownFFAimedArea
2. set all sound propertys to none
3. set all visual effect propertys to none, and add your custom projectile to the projectile property
4. set hide in UI
5. add a condition with GetIsID Player == 0
6. leave everything else as it was
The Spell
1. make a copy of the spell: Rout
2. set menu display object and casting perk to none
3. replace rout:confidence with your custom magic effect
4. replace Rout - Master of the Mind with InfluenceAggUpFFAimedArea, give it a lower magnitude as the rout mgef but the same duration
The Activator
An activator needs to have a name so you can activate it in game. I'm using a real time placement code property of @Chesko to place the impaled warning everywhere I want, and then use menu code to interact with it. Basically I let you write some text on it, review it, replace it, remove it after being placed, add fire accelerant to it so you can burn it and for the newest addition, add a aura of fear effect. Use this part of scripts in your code, or any other scripting that you deem convenient and "professional".
... Spell Property CUYC_PolearmFearSpell Auto Event OnActivate(ObjectReference akActionRef) If CUYC_IsInPlacement.GetValueInt() == 1 ElseIf CUYC_IsInPlacement.GetValueInt() == 0 If akActionRef == PlayerREF Int ButtonTomb = CUYC_InteractPolearmMessage.show() as Int If ButtonTomb == 0 HandleReview() ElseIf ButtonTomb == 1 HandleRewrite() ElseIf ButtonTomb == 2 HandleReplace() ElseIf ButtonTomb == 3 self.UnregisterForUpdateGameTime() self.Disable() self.Delete() ElseIf ButtonTomb == 4 If PlayerREF.GetItemCount(CUYC_BrandAccelerator) >= 1 self.PlaceAtMe(CUYC_OilPool) PlayerREF.RemoveItem(CUYC_BrandAccelerator, 1) ElseIf PlayerREF.GetItemCount(CUYC_BrandAccelerator) <= 0 If CUYC_HelpMessagesActiveGlobal.GetValueInt() == 1 Debug.Notification("You don't have any Fire Accelerant!") Else EndIf EndIf ElseIf ButtonTomb == 5 self.RegisterForSingleUpdateGameTime(0.1) EndIf EndIf EndIf RestoreValues()EndEvent Event OnUpdateGameTime() ObjectReference FearTarget = Game.FindRandomActorFromRef(self, 10000.0) as ObjectReference If FearTarget != PlayerREF CUYC_PolearmFearSpell.Cast(self, FearTarget) EndIf self.RegisterForSingleUpdateGameTime(0.1) EndEvent