Difference between revisions of "AddScriptPackage"
Added a note about interrupt packages
imported>Qazaaq |
imported>QQuix (Added a note about interrupt packages) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
'''Syntax''' | |||
''[ActorRefID.]''AddScriptPackage PackageID:ref | |||
Adds a script package to the calling actor. This package takes precedence over all other packages until it is done. | |||
== | ==Examples== | ||
AddScriptPackage MQ07BeggarToTavern | AddScriptPackage MQ07BeggarToTavern | ||
Line 15: | Line 14: | ||
* Unless the added package has some constraint on it ("must complete" and/or "must reach location"), it will be removed the next time the actor reevaluates his package. | * Unless the added package has some constraint on it ("must complete" and/or "must reach location"), it will be removed the next time the actor reevaluates his package. | ||
* This function does not work if the actor is currently running an interrupt package (e.g. dialogue). You may detect if the current package is an interrupt package by checking if the current package mod index is 255 (see [[GetSourceModIndex]]) or by comparing [[GetCurrentPackage]] (which returns an interrupt package) with [[GetCurrentEditorPackage]] (which will ignore interrupt packages and return the active package - the one that has been interrupted and will resume later). If they return different packages, the actor is running an interrupt package. | |||
==See Also== | ==See Also== | ||
Line 20: | Line 21: | ||
*[[EvaluatePackage]] | *[[EvaluatePackage]] | ||
Line 32: | Line 30: | ||
[[Category: Actor Functions]] | [[Category: Actor Functions]] | ||
[[Category: Actor Functions (CS 1.0)]] | [[Category: Actor Functions (CS 1.0)]] | ||
<!-- Begin Search Terms | |||
Add | |||
Script | |||
Package | |||
End Search Terms --> |