Difference between revisions of "DropFirstObject - ObjectReference"
Jump to navigation
Jump to search
imported>Plplecuyer |
imported>Hannibalektr |
||
| Line 8: | Line 8: | ||
== Syntax == | == Syntax == | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
ObjectReference Function DropFirstObject() native | ObjectReference Function DropFirstObject(bool abInitiallyDisabled=false) native | ||
</source> | </source> | ||
== Parameters == | |||
* abInitiallyDisabled: If true, the dropped object will be disabled when dropped. | |||
== Return Value == | == Return Value == | ||
Latest revision as of 09:10, 7 July 2016
Member of: ObjectReference Script
Drops the specified object from this object's inventory.
Syntax[edit | edit source]
ObjectReference Function DropFirstObject(bool abInitiallyDisabled=false) nativeParameters[edit | edit source]
- abInitiallyDisabled: If true, the dropped object will be disabled when dropped.
Return Value[edit | edit source]
The object that was dropped.
Examples[edit | edit source]
; Drops the first item from the player's inventory.
Game.GetPlayer().DropFirstObject()Notes[edit | edit source]
The definition of "first" is up to the code, and so this basically drops a random object. However it does it in such a manner that, if called multiple times, is likely to repeatedly drop the same kind of object until that object's stack is exhausted before moving onto the "next" stack.