Difference between revisions of "AddKeyIfNeeded - ObjectReference"

Jump to navigation Jump to search
imported>Jlundin
 
imported>Thingy Person
 
Line 8: Line 8:
<source lang="papyrus">
<source lang="papyrus">
Function AddKeyIfNeeded(ObjectReference ObjectWithNeededKey)
Function AddKeyIfNeeded(ObjectReference ObjectWithNeededKey)
key NeededKey = ObjectWithNeededKey.GetKey()
if NeededKey != None
if GetItemCount(NeededKey) == 0
AddItem(NeededKey)
EndIf
EndIf
EndFunction
</source>
</source>


Navigation menu