antstubell Posted October 11, 2020 Share Posted October 11, 2020 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 More sharing options...
dylbill Posted October 11, 2020 Share Posted October 11, 2020 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 EndEventThis 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 More sharing options...
IsharaMeradin Posted October 12, 2020 Share Posted October 12, 2020 You could have a small script on a player alias that listens for the OnObjectEquipped event. If the equipped object is a light, store it in a light property. Then use the script on the activator to grab the property from the player alias script and unequip it. Link to comment Share on other sites More sharing options...
antstubell Posted October 12, 2020 Author Share Posted October 12, 2020 Thank you both. Link to comment Share on other sites More sharing options...
Recommended Posts