Difference between revisions of "EvaluatePackage"
Jump to navigation
Jump to search
no edit summary
imported>JOG |
imported>Scruggs |
||
Line 7: | Line 7: | ||
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. | 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. | ==Notes== | ||
*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. | |||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category: AI Functions]] | [[Category: AI Functions]] | ||
[[Category:Actor Functions]] | [[Category:Actor Functions]] |