OnStoryRemoveFromPlayer - Quest

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Quest Script

Event called when this quest is started via a remove from player story manager event.

Syntax[edit | edit source]

Event OnStoryRemoveFromPlayer(ObjectReference akOwner, ObjectReference akItem, Location akLocation, \
  Form akItemBase, int aiRemoveType)

Parameters[edit | edit source]

  • akOwner: The ObjectReference that owns the item.
  • akItem: The ObjectReference that was removed.
  • akLocation: The Location where the remove happened.
  • akItemBase: The base object of the removed item.
  • aiRemoveType: The type of remove performed. Will be one of the following:
    • 0: None
    • 1: Stolen
    • 2: Consumed
    • 3: Script
    • 4: Dropped
    • 5: Given
    • 6: Put in container

Examples[edit | edit source]

Event OnStoryRemoveFromPlayer(ObjectReference akOwner, ObjectReference akItem, Location akLocation, \
  Form akItemBase, int aiRemoveType)
  if aiRemoveType == 2
    Debug.Trace("The player just consumed " + akItemBase)
  endIf
endEvent

Notes[edit | edit source]

The above example may be misleading as item consumption does not seem to send events to the Story Manager. A condition-less stacked branch sends events every time an item is dropped, but did not send events when drinking a potion.

See Also[edit | edit source]