DropFirstObject - ObjectReference

From Creation Kit
Jump to: navigation, search

Member of: ObjectReference Script

Drops the specified object from this object's inventory.

Syntax

ObjectReference Function DropFirstObject(bool abInitiallyDisabled=false) native

Parameters

  • abInitiallyDisabled: If true, the dropped object will be disabled when dropped.

Return Value

The object that was dropped.

Examples

; Drops the first item from the player's inventory.
Game.GetPlayer().DropFirstObject()

Notes

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.

See Also