OnHit for armor

Post » Mon Jun 18, 2012 9:22 am

It is possible to use an OnHit event to an armor reference? I want to execute something if the armor that i have equipped gets hit by an enemy.

Thank you.
User avatar
Killer McCracken
 
Posts: 3456
Joined: Wed Feb 14, 2007 9:57 pm

Post » Mon Jun 18, 2012 4:14 pm

Im trying to add durability to an armor. anyone can help me?
User avatar
Emily Jones
 
Posts: 3425
Joined: Mon Jul 17, 2006 3:33 pm

Post » Mon Jun 18, 2012 1:01 pm

bump
User avatar
Scotties Hottie
 
Posts: 3406
Joined: Thu Jun 08, 2006 1:40 am

Post » Mon Jun 18, 2012 3:27 pm

Put the onhit on yourself, as it's you who get hit and not the armor.
Then you have to inspect armor pieces and change the condition value.
User avatar
Aliish Sheldonn
 
Posts: 3487
Joined: Fri Feb 16, 2007 3:19 am

Post » Mon Jun 18, 2012 3:33 pm

Im going to try that. Thanks
User avatar
Prue
 
Posts: 3425
Joined: Sun Feb 11, 2007 4:27 am

Post » Mon Jun 18, 2012 7:00 am

Put the onhit on yourself, as it's you who get hit and not the armor.
Then you have to inspect armor pieces and change the condition value.
How do you inspect the armor pieces and change values on them?
User avatar
Kelly Tomlinson
 
Posts: 3503
Joined: Sat Jul 08, 2006 11:57 pm

Post » Mon Jun 18, 2012 9:33 am

How do you inspect the armor pieces and change values on them?

I want to know this too because im not finding a way to get the armor reference. And how do i access de reference variable from the actor Script?

On the player Actor i have this script:

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, \  bool abBashAttack, bool abHitBlocked)  weaponEquipped  = Game.GetPlayer().GetEquippedWeapon()EndEvent

And in the Weapon (Iron Sword) Script i have:

int armorCondition = 100
User avatar
Krista Belle Davis
 
Posts: 3405
Joined: Tue Aug 22, 2006 3:00 am

Post » Mon Jun 18, 2012 5:06 pm

bump
User avatar
Melung Chan
 
Posts: 3340
Joined: Sun Jun 24, 2007 4:15 am

Post » Mon Jun 18, 2012 12:40 pm

anyone?
User avatar
Baylea Isaacs
 
Posts: 3436
Joined: Mon Dec 25, 2006 11:58 am


Return to V - Skyrim