Background for Skyrim SE
Member of the Quest script
eventOnStoryAddToPlayer(ObjectReferenceakOwner, ObjectReferenceakContainer, LocationakLocation, FormakItemBase, intaiAcquireType)

Description

Wiki Description

Event called when this quest is started via an add to player story manager event.


Parameters

  1. ObjectReferenceakOwner

    CK Wiki Description

    The ObjectReference that owned the object.

  2. ObjectReferenceakContainer

    CK Wiki Description

    The ObjectReference that contained the object.

  3. LocationakLocation

    CK Wiki Description

    The Location where it happened.

  4. FormakItemBase

    CK Wiki Description

    The base object of the item that was added to the player's inventory.

  5. intaiAcquireType

    CK Wiki Description

    The type of acquire that was performed. Will be one of the following:* 0:None

    • 1:Steal
    • 2:Buy
    • 3:Pick-pocket
    • 4:Pick up
    • 5:Container
    • 6:Dead body

Examples

Event OnStoryAddToPlayer(ObjectReference akOwner, ObjectReference akContainer, Location akLocation, Form akItemBase, \
  int aiAcquireType)
  if aiAcquireType == 6 ; Dead body
    Debug.Trace("The player just looted a " + akItemBase + " from a dead body")
  endIf
endEvent

Auto-Generated Example

Scriptname MyCoolScript extends Quest

event OnStoryAddToPlayer(ObjectReference akOwner, ObjectReference akContainer, Location akLocation, Form akItemBase, int aiAcquireType)
    Debug.trace("Event received - OnStoryAddToPlayer: akOwner = " + akOwner + " akContainer = " + akContainer + " akLocation = " + akLocation + " akItemBase = " + akItemBase + " aiAcquireType = " + aiAcquireType)
endEvent

Related Pages


Additional References

View this event’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.