Difference between revisions of "EvaluatePackage"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Maturin
 
imported>Khadir
(Documenting actor functions ... also, evp doesn't have an argument, AFAIK)
Line 1: Line 1:
{{ActorFunction}}
'''Syntax:'''
'''Syntax:'''
  EvaluatePackage ''PackageID''
[''ActorID''.]EvaluatePackage
  evp ''PackageID''
[''ActorID''.]evp


Call this function on a specific Actor, to force the actor to reevaluate which package they should be running immediately. If a script has changed a condition and needs an actor to respond immediately, this function can be called on the actor.  
Call this function on a specific Actor, to force the actor to reevaluate which package they should be running immediately. If a script has changed a condition and needs an actor to respond immediately, this function can be called on the actor.  

Revision as of 04:17, 28 June 2006

Template:ActorFunction Syntax:

[ActorID.]EvaluatePackage
[ActorID.]evp

Call this function on a specific Actor, to force the actor to reevaluate which package they should be running immediately. If a script has changed a condition and needs an actor to respond immediately, this function can be called on the actor.

For example, you want an actor to activate a switch when a flag in a script is set to true. In order for the actor to activate the switch right after the flag is set you need to force the actor to re-evaluate his packages right away instead of waiting for the next hour by calling EvaluatePackage.

This function should be used sparingly as it can be slow if the actor has a long list of packages and conditions to test.