1,482
edits
imported>Thingy Person (→Syntax) |
m (Convert source tags to syntaxhighlight) |
||
| Line 6: | Line 6: | ||
== Syntax == | == Syntax == | ||
< | <syntaxhighlight lang="papyrus"> | ||
Function AddKeyIfNeeded(ObjectReference ObjectWithNeededKey) | Function AddKeyIfNeeded(ObjectReference ObjectWithNeededKey) | ||
key NeededKey = ObjectWithNeededKey.GetKey() | key NeededKey = ObjectWithNeededKey.GetKey() | ||
| Line 15: | Line 15: | ||
EndIf | EndIf | ||
EndFunction | EndFunction | ||
</ | </syntaxhighlight> | ||
== Parameters == | == Parameters == | ||
| Line 24: | Line 24: | ||
== Examples == | == Examples == | ||
< | <syntaxhighlight lang="papyrus"> | ||
; Creates a key to BobsDoorRef and puts it in BobRef's inventory if BobRef doesn't already have that key in his inventory. | ; Creates a key to BobsDoorRef and puts it in BobRef's inventory if BobRef doesn't already have that key in his inventory. | ||
BobRef.AddKeyIfNeeded(BobsDoorRef) | BobRef.AddKeyIfNeeded(BobsDoorRef) | ||
</ | </syntaxhighlight> | ||
== See Also == | == See Also == | ||