DropObject - ObjectReference

From the CreationKit Wiki
Revision as of 13:54, 11 November 2011 by imported>Scornett (Reverted edits by Scornett-Bot (talk) to last revision by Rhavlovick)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: ObjectReference Script

Drops the specified object from this object's inventory.

Syntax

ObjectReference Function DropObject(Form akObject, int aiCount = 1) native

Parameters

  • akObject: The object to drop from the inventory.
  • aiCount: How many to drop
    • Default: 1

Return Value

The object that was dropped.

Examples

; Drops one chest from the player's inventory, and unlocks it
Game.GetPlayer().DropObject(ChestProperty).Lock(false)


; Drops one hundred arrows from the player's inventory
Game.GetPlayer().DropObject(ArrowProperty, 100)

See Also