Jump to content

Unequip a torch, specifically a torch


antstubell

Recommended Posts

I've just been dancing around with an OnActivate script that if player has a torch equipped makes him unequip it. I've read that I should use GetEquiipedItemType for lights but there is not equivalent 'UnequipItemType' for the condition. Do I need to make the torch a Light Property and unequip that way?

Thanks.

Link to comment
Share on other sites

What you want is UnEquipItem. It looks like in vanilla there's only 3 torches that can be equipped, so you could do something like this:

 

Light Property SovngardeWarmLight Auto
Light Property Torch01 Auto
Light Property Torch01Shadow Auto
Actor Property PlayerRef Auto

Event OnActivate(ObjectReference akActionRef)
    If akActionRef as Actor 
        If (akActionRef as Actor) == PlayerRef
            If PlayerRef.GetEquippedItemType(0) == 11 || PlayerRef.GetEquippedItemType(1) == 11
                PlayerRef.UnEquipItem(SovngardeWarmLight)
                PlayerRef.UnEquipItem(Torch01)
                PlayerRef.UnEquipItem(Torch01Shadow)
            Endif 
        Endif 
    Endif 
EndEvent

This won't unequip torches added by other mods though. To do that, you'd have to use SKSE.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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