Difference between revisions of "SetKeywords - InstanceData"

168 bytes added ,  18:08, 14 October 2022
 
Line 19: Line 19:
== Examples ==
== Examples ==
<source lang="papyrus">
<source lang="papyrus">
; set up the weapon instance
int slotIndex = Game.GetPlayer().GetEquippedItemType(0) + 32
instanceData:Owner myInstance = Game.GetPlayer().GetInstanceOwner(slotIndex)
; we want to add the keyword MyKeyword to our instance using an easy-to-use function
; we want to add the keyword MyKeyword to our instance using an easy-to-use function
instanceData.SetKeywords(myInstance, editKeywords(instancedata.GetKeywords(myInstance), MyKeyword, "add"))
instanceData.SetKeywords(myInstance, editKeywords(instancedata.GetKeywords(myInstance), MyKeyword, "add"))
12

edits