DropObject - ObjectReference

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: ObjectReference Script

Drops the specified base object from this object's inventory.

Syntax[edit | edit source]

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

Parameters[edit | edit source]

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

Return Value[edit | edit source]

The object that was dropped.

Examples[edit | edit source]

; 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)

Notes[edit | edit source]

This will not drop a specific reference - if you want to drop a specific reference, then call Drop() on it instead.

See Also[edit | edit source]