OnPackageEnd - Actor

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

Event called when the actor finishes a package.

Syntax[edit | edit source]

Event OnPackageEnd(Package akOldPackage)

Parameters[edit | edit source]

  • akOldPackage: The Package that just completed.

Examples[edit | edit source]

Event OnPackageEnd(Package akOldPackage)
  Debug.Trace("We just completed the " + akOldPackage + " package")
endEvent


Notes[edit | edit source]

  • This event only occurs for packages that have completion conditions, and it does not mean the actor is no longer running the package. For example, an actor running a package based on the Travel template will receive this event upon reaching the package's destination, but the actor will continue running the package for as long as it is the highest priority package whose conditions are met. To find out when an actor is no longer running the package, use OnPackageChange.
  • This can be used in a ReferenceAlias script attached to the player that is currently controlled via SetPlayerAIDriven, and has finished a package.

See Also[edit | edit source]