RemoveScriptPackage

From GECK
Jump to: navigation, search


A function included in the GECK for Fallout 3.

Description

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

Syntax

[help]
[ActorRefID].RemoveScriptPackage

Example

ActorRef.RemoveScriptPackage 

Notes

  • Removing a script package on an actor that has no script package can cause the package 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.
    • Also, it will prevent the player starting or acquiring new packages or procedures which are triggered by functions. For instance, calling ForceFlee while RemoveScriptPackage is being called will prevent the fleeing behavior from triggering.
    • Conversely, calling RemoveScriptPackage will stop and remove the actor's current package/procedure had it been triggered by a function. For an example, calling the function on a fleeing actor will cancel the flee procedure.
  • 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.

Bugs

  • Issuing an EvaluatePackage within a few frames of RemoveScriptPackage may cause the package to be re-added to the Actor.

See Also