DropObject - ObjectReference: Difference between revisions

m
Convert source tags to syntaxhighlight
imported>Taleden
(added note about trying to DropObject(objectReference))
m (Convert source tags to syntaxhighlight)
 
Line 7: Line 7:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
ObjectReference Function DropObject(Form akObject, int aiCount = 1) native
ObjectReference Function DropObject(Form akObject, int aiCount = 1) native
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 20: Line 20:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Drops one chest from the player's inventory, and unlocks it
; Drops one chest from the player's inventory, and unlocks it
Game.GetPlayer().DropObject(ChestProperty).Lock(false)
Game.GetPlayer().DropObject(ChestProperty).Lock(false)
</source>
</syntaxhighlight>
<br/>
<br/>
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Drops one hundred arrows from the player's inventory
; Drops one hundred arrows from the player's inventory
Game.GetPlayer().DropObject(ArrowProperty, 100)
Game.GetPlayer().DropObject(ArrowProperty, 100)
</source>
</syntaxhighlight>


== Notes ==
== Notes ==