Difference between revisions of "Script Processing"

1 byte added ,  12:55, 29 April 2010
m
imported>Shademe
imported>UDUN
Whenever a local variable on a persistent ref is set, the script of that reference will be run in the next frame. Hence if a script continually sets a variable on itself, then it will continue to run in every frame.
 
;Positive: This can be used to effectively keep a remote reference in "high processing". E.g. if items are stored in a remote container, then ordinarily the OnDrop and OnUnequip blocks of those items will not be run since the container is not local, and thus not in high processing. But by "heartbeating" hethe remote container ref, the item blocks can be made to run.
;Negative: Unintentional heartbeating of remote references will keep them permanently in high processing and thus hurt performance. Modders should ensure that script for persistent refs do not set a variable in every frame. (Be careful of this particularly in gameMode blocks, which are occasionally run even for out of scope persistent references.)
 
Anonymous user