RemoveScriptPackage

From the Oblivion ConstructionSet Wiki
Revision as of 17:53, 25 January 2009 by imported>Shademe (→‎Notes:  )
Jump to navigation Jump to search

Syntax

RemoveScriptPackage

Removes the currently running script package from the calling actor. Only necessary if you added a script package which was set to run indefinitely. When the script package is removed, the actor will automatically choose a new package.


Example

; from MS45DarMaScript
if getIsCurrentPackage MS45DarMaPrisonerGreetPlayer == 1
  If getInSameCell player == 0
    removeScriptPackage
  endif
endif

Notes

  • Removing a script package on an actor that has no script package can cause the script to stop running on all instances of that actor. It is preferable to use a package(s) attached to the actor in its AI definition with one or more conditions specified.
  • Parameter usage is accepted by the script compiler, but has no effect during run-time.
  • This function cannot be used to remove Editor-added packages.

See Also