Apply specific type of damage to player

Post » Tue Sep 22, 2015 7:09 am

Is there a way to apply a physical or magical attack to the player from a script, and let the game handle the damage reductions from armor / magic resist? I know I can do damageAV("Health") but this bypasses resistances and that's not what I want.

Basically, I want to apply a static amount of damage (let's say 100) to the player in specific situations, and have that amount be reduced by the player's armor or magic resist, depending on whether I'm using physical or magical damage.

User avatar
Robert DeLarosa
 
Posts: 3415
Joined: Tue Sep 04, 2007 3:43 pm

Post » Tue Sep 22, 2015 4:47 am

No idea regarding physical, but could you not make a Spell for each Damage Type, and have the Player Cast that on themselves?

SpellID.Cast(Game.GetPlayer(), Game.GetPlayer()

should do the trick. The PC does not even need to actually know/have the Spell to cast it in that manner; you might even be able to do the same for physical now I think about it--you can set a Resist Stat in the Magic Effect, so maybe you could use Armor Rating, or something? I've not looked, so that might not be possible, but it's worth a shot :)

User avatar
Sherry Speakman
 
Posts: 3487
Joined: Fri Oct 20, 2006 1:00 pm


Return to V - Skyrim