Make a boss NPC only recieve damage from a specific weapon

Post » Wed Jun 29, 2016 8:01 pm

Hi all. I am tinkering with and tweaking a custom final boss for my current mod. I was wondering if there's any way to make my boss completely invulnerable to any damage except when the player hits him with a specific weapon.


The kind of thing I am looking for is:



When struck with The Blade "Nightsbane" the boss NPC loses health as normal, when he is struck with any other weapon, magic or any other damage of any kind he does not lose any health and says something like "Your pathetic weapons are useless against me."



Does anyone know how I can achieve this by scripting or any other way????

User avatar
jeremey wisor
 
Posts: 3458
Joined: Mon Oct 22, 2007 5:30 pm

Post » Wed Jun 29, 2016 12:57 pm

You set the Boss invulnerable.



Then you make an enchantment and place it on the weapon.



You need to make a custom magic effect and script this.




You can not check Hostile or the spell will not work on an invulnerable actor.




Event OnEffectStart(Actor akTarget, Actor akCaster)

if the target is the Boss. Set invulnerbable false.

endEvent



Event OnEffectFinish(Actor akTarget, Actor akCaster)

if the target is the Boss. Set invulnerbable true.

endEvent



You also need to add another magic effect to the enchantment that is hostel so the opponent gets angry when you strike them. Especially if you are talking about a staff.

User avatar
Eilidh Brian
 
Posts: 3504
Joined: Mon Jun 19, 2006 10:45 am

Post » Wed Jun 29, 2016 3:41 pm

Thanks This is what I am looking for I can add to that script to get exactly what I need. I was planning on making the weapon a sword.

User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am


Return to V - Skyrim