Jump to content

ArmorAddon.SetModelPath not taking immediate effect


Lombra

Recommended Posts

Hi,

I only just got into Skyrim modding. I'll be sticking to scripting, and what I wanted to do was a simple transmog mod. Anyway, so I'm using SetModelPath on the ArmorAddon object and it works, but not immediately; I have to first unequip and requip the item to see the changed model. Is this intended? How can I have it applied immediately?

 

Here's what I've got. (just for testing, so far)

Scriptname playerScript extends ReferenceAlias

String model

Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference)
    Debug.Notification(akBaseObject.GetName())
    model = (akBaseObject as Armor).GetNthArmorAddon(0).GetModelPath(false, true)
endEvent

Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)
    Utility.Wait(1)
    Debug.Notification(akBaseObject.GetName())
    Debug.Notification(model)
    (akBaseObject as Armor).GetNthArmorAddon(0).SetModelPath(model, false, true)
endEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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