Difference between revisions of "EvaluatePackage"
Jump to navigation
Jump to search
imported>DragoonWraith (CS 1.0) |
imported>Bruneauinfo m (→Notes) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 10: | Line 10: | ||
*This function should be used sparingly as it can be slow if the actor has a long list of packages and conditions to test. | *This function should be used sparingly as it can be slow if the actor has a long list of packages and conditions to test. | ||
*Avoid calling evp at times when the actor is already updating his AI, such as immediately after [[removeScriptPackage]] or [[forceFlee]] is called. Otherwise the game may crash. | *Avoid calling evp at times when the actor is already updating his AI, such as immediately after [[removeScriptPackage]] or [[forceFlee]] is called. Otherwise the game may crash. | ||
*The actor id used in the above script is the actors "reference id", i.e., actorREF.evp | |||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category:Functions (CS)]] | |||
[[Category: Functions (CS 1.0)]] | [[Category: Functions (CS 1.0)]] | ||
[[Category: AI Functions]] | [[Category: AI Functions]] | ||
Line 17: | Line 19: | ||
[[Category: Actor Functions]] | [[Category: Actor Functions]] | ||
[[Category: Actor Functions (CS 1.0)]] | [[Category: Actor Functions (CS 1.0)]] | ||
<!-- Begin Search Terms | |||
Evaluate | |||
Package | |||
End Search Terms --> |
Latest revision as of 21:29, 17 December 2010
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.
Notes[edit | edit source]
- This function should be used sparingly as it can be slow if the actor has a long list of packages and conditions to test.
- Avoid calling evp at times when the actor is already updating his AI, such as immediately after removeScriptPackage or forceFlee is called. Otherwise the game may crash.
- The actor id used in the above script is the actors "reference id", i.e., actorREF.evp