Difference between revisions of "AddKeyIfNeeded - ObjectReference"
Jump to navigation
Jump to search
→Syntax
imported>Jlundin |
imported>Thingy Person (→Syntax) |
||
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> | ||