This is one of the hardest things I've encountered that seems like it should have an easy solution. I'm trying to simulate a physical attack on a creature with a script or spell. But everything I try has a negative side effect.
1. Calling an activator to cast a simple Damage Health spell on the target shows a magic hit shader (which is no good) and is susceptible to the target's magic resistance (also no good).
2. You could use ModActorValue Health -30, and I've seen a few mod scripts use this, but it's not a good solution I don't think. Because it not only takes away 30 hit points, it also caps the target's Health to be 30 less than it should be. For instance, if you decrease a target's health by 30 using Target.ModActorValue -30, then that target cannot get those hit points back with healing or regeneration. Unbalancing against mages. No good.
3. Adding and taking away a Damage Health "Ability" to the target doesn't work as it probably should. This technique works great with Damage Fatigue. You can add a Damage Fatigue Ability to the target for 30 magnitude, and then remove it, with the end result being the target lost exactly 30 Fatigue. No magic shaders. But trying the same with Damage Health (let's say for 30 damage) causes the target to lose a lot more than 30 hit points, I think because the game engine runs it every frame until the spell duration is over. No good.
I tried solving this last one with this script:
ScriptName aaHit01ScrRef SelfShort FrameTickBegin ScriptEffectStart Set Self to GetSelf Set FrameTick to 0EndBegin ScriptEffectUpdate If FrameTick == 0 Self.AddSpell aaHit01Ab ;This is the Damage Health for 30 points ability Else Self.RemoveSpell aaHit01Ab Dispel aaHit01 Return Endif Set FrameTick to FrameTick + 1EndBegin ScriptEffectFinish Self.RemoveSpell aaHit01Ab Dispel aaDHit01End
But that doesn't take away any health at all. I tried it on myself and I could see the message "Damage Health added" but it didn't affect my hit points. I'm at a loss!