Difference between revisions of "AddScriptPackage"

432 bytes added ,  13:56, 29 March 2015
Added a note about interrupt packages
imported>Princess stomper
imported>QQuix
(Added a note about interrupt packages)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=='''Description'''==
'''Syntax'''


Add a script package to the calling actor. This package takes precedence over all other packages until it is done.
  ''[ActorRefID.]''AddScriptPackage PackageID:ref


=='''Syntax'''==
Adds a script package to the calling actor.  This package takes precedence over all other packages until it is done.


[''ActorRefID''.]AddScriptPackage ''PackageID''


=='''Examples'''==
==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]]


=='''Reference'''==
[[AddScriptPackage_Reference|List of functions that use AddScriptPackage]]




Anonymous user