Terra Nova Posted February 14, 2015 Share Posted February 14, 2015 (edited) Scriptname RestoreHealthOnBlock extends ActiveMagicEffect Actor PlayerRef Float HealthBeforeBlock Float HealthAfterBlock Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, Bool abPowerAttack, Bool abSneakAttack, Bool abBashAttack, Bool abHitBlocked) ;/OnHit is a slow function. It may not catch every block. Furthermore it runs on EVERY kind of hit. Not just what you have coded it to listen for. Stack overflow is a concern with this function./; PlayerRef = Game.GetPlayer() HealthBeforeBlock = PlayerRef.GetActorValue("Health") if !abHitBlocked HealthAfterBlock = PlayerRef.GetActorValue("Health") if HealthBeforeBlock != HealthAfterBlock PlayerRef.RestoreActorValue("Health", (HealthBeforeBlock - HealthAfterBlock)) endif endif EndEvent I'm not walking you through on how to attach this. You'll have to learn on your own. This script is intended to work as an ability type spell. I'll give you links to help you through setting this up.http://www.creationkit.com/Spellhttp://www.creationkit.com/Magic_Effect Edited February 14, 2015 by Terra Nova Link to comment Share on other sites More sharing options...
Kerberus14 Posted February 14, 2015 Share Posted February 14, 2015 That won't work if the player dies before the hp is restored :D. Link to comment Share on other sites More sharing options...
Darkfoot Posted February 14, 2015 Author Share Posted February 14, 2015 (edited) So far, iv'e managed to take no damage when blocking through use of a perk, which modifies incoming damage by 0. I've made it so it takes things like incoming arrows, spells, dragon shouts, hazards, etc. into consideration, using the conditions tab, so those type of attacks will ignore the "modify incoming damage" effect. Only problem with this method is that against melee attacks, you could get hit from the side or from behind and still won't take damage. Also having trouble with poisons that AREN'T spit at you, by a chorus or spider. If a melee weapon has a poison on it then it will just bypass through any blocking And just to be clear I only need to make it so that NPCs can block without taking damage. For the player just use Skytweak. Edited February 14, 2015 by Darkfoot Link to comment Share on other sites More sharing options...
Darkfoot Posted February 17, 2015 Author Share Posted February 17, 2015 @Terra Nova That script doesn't work. (17,37): no viable alternative at input "HealthBeforeBlock - HealthAfterBlock" Link to comment Share on other sites More sharing options...
Avastgard Posted February 17, 2015 Share Posted February 17, 2015 If only more people knew the wonders SkyTweak can do... Link to comment Share on other sites More sharing options...
bobgober Posted August 24, 2016 Share Posted August 24, 2016 (edited) I know 1 guy mentioned skyTweak max resistance, but if you scroll to the bottom of the combat page in skyTweak there are two sliders, 1 for weapon blocking and the other for shield blocking, I put mine at .95 and found blocking to be much more effective but doesn't break the game like the max resistance does. It is also still not so overpowered that you just need to stand there and hold down block. I also saw your post that you didn't really know what skyTweak was, i highly, highly recommend you get it, it allows you to custom tailor your game experience so much that some mods become nearly useless. Edited August 24, 2016 by bobgober Link to comment Share on other sites More sharing options...
Recommended Posts