OnStoryRemoveFromPlayer - Quest

Revision as of 10:37, 15 September 2016 by imported>Antares (Used condition-less nodes/quests to test if the story manager gets events for potion consumption - it does not. Noted this in the article.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: Quest Script

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

SyntaxEdit

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

ParametersEdit

  • 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

ExamplesEdit

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

NotesEdit

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 AlsoEdit