Jump to content

Photo

100% block damage reduction (No damage taken when blocking attacks)

damage reduction blocking

  • Please log in to reply
25 replies to this topic

#21
Terra Nova

Terra Nova

    Old hand

  • Account closed
  • PipPipPip
  • 610 posts
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/Spell

http://www.creationk...om/Magic_Effect


Edited by Terra Nova, 14 February 2015 - 01:28 PM.


#22
Kerberus14

Kerberus14

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,127 posts

That won't work if the player dies before the hp is restored :D.



#23
Darkfoot

Darkfoot

    Enthusiast

  • Members
  • PipPip
  • 212 posts
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 by Darkfoot, 14 February 2015 - 08:50 PM.


#24
Darkfoot

Darkfoot

    Enthusiast

  • Members
  • PipPip
  • 212 posts

@Terra Nova

 

That script doesn't work.

 

(17,37): no viable alternative at input "HealthBeforeBlock - HealthAfterBlock"



#25
Avastgard

Avastgard

    Resident poster

  • Supporter
  • PipPipPipPipPip
  • 3,080 posts

If only more people knew the wonders SkyTweak can do...



#26
bobgober

bobgober

    Stranger

  • Members
  • Pip
  • 2 posts

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 by bobgober, 24 August 2016 - 08:48 PM.






Also tagged with one or more of these keywords: damage, reduction, blocking

Page loaded in: 1.053 seconds