Jump to content

Repairing Equipped Items On An Actor


Recommended Posts

Hi folks, I'm trying to either simulate or actually fully repair all currently equipped items in an actor's inventory to the max base health of the items.

 

Simulated

Previously, I was able to fake this by setting refs with GetEquippedObject and then removing and adding the objects as refs from the actor. But the problem is if any particular slot is empty at the time then the script will halt in the block when trying to remove and replace that item. It would be nice if it just skipped it and went on to the next line in the block, but it doesn't do that! Even asking if the item is equipped may not work if the refd object does not exist.

 

I don't suppose there's any way to check if any object is currently equipped in a particular OBSE-defined slot. If I could do that then the sim method would probably work.

 

Actual

I tried messing around with restoring the item's health but can't seem to figure out how to get the current health back to full. It would also be nice to know how to do this with enchantment health for weapons. I would love to see an actual working example since I don't always understand the minimal examples in the wiki and obse command doc. Of course this still needs to work with in a walk-through check on all relevant slots.

 

 

Basically the goal of this script is to walk through most slots (except for rings and torches) and check to see if they're equipped with something, then either replace them with new or just reset the health to the max base. Even better: I'd like to do a partial repair with one option that should not ever exceed the base max and a full repair with another option.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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