Difference between revisions of "RemoveScriptPackage"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>MentalElf
m (Just adding note of a problem with this operator)
imported>Scruggs
(formatting)
Line 1: Line 1:
=='''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'''==
=='''Syntax'''==

RemoveScriptPackage
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''' ==
==Example==
(Out of MS45DarMaScript)
; from MS45DarMaScript
if getiscurrentPackage MS45DarMaPrisonerGreetPlayer == 1
if getIsCurrentPackage MS45DarMaPrisonerGreetPlayer == 1
If getinsamecell player == 0
If getInSameCell player == 0
removescriptpackage
removeScriptPackage
endif
endif
endif
endif


==''' Notes''' ==
==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.
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==
==See Also==

Revision as of 09:53, 23 January 2007


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.

See Also

AddScriptPackage