Jump to content

GetEquippedCurrentHealth and Companions problem


Maskar

Recommended Posts

I created a mod unequiping any armor that is broken (health <= 0). However, eventhough it works fine for the player and npcs it doesn't work for companions. This is how I check 1 of the items:

 

if ( me.GetEquippedObject 2 != 0 )

set itemequiped_ref to me.GetEquippedObject 2

if ( me.GetEquippedCurrentHealth 2 <= 0 ) && ( isArmor itemequiped_ref )

me.UnequipItemNS itemequiped_ref

endif

endif

 

For some strange reason the GetEquippedCurrentHealth check doesn't work properly, but only for Companions. Changing it to checking if > 0 does unequip the item which obviously shouldn't be happening.

 

Anyone got a clue what's going on? Thanks!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...