Difference between revisions of "RemoveScriptPackage"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>MentalElf
(Add notes.)
imported>MentalElf
m (Just adding note of a problem with this operator)
Line 19: Line 19:
Removing a script package on an actor that has no
Removing a script package on an actor that has no
script package can cause the script to stop running
script package can cause the script to stop running
on all instances of that actor.
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.


==See Also==
==See Also==

Revision as of 18:32, 3 December 2006

Description

Removes the currently running script package from the calling actor. Only necessary if you added a script package which was set to run indefinitely.


Syntax

RemoveScriptPackage


Example

(Out of 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.

See Also

AddScriptPackage