Difference between revisions of "Script Processing"
Jump to navigation
Jump to search
Added info on script processing order
imported>UDUN |
imported>Shademe (Added info on script processing order) |
||
|
;[[Quest scripts|Quests]]: Processed every 5 seconds (by default) when the quest is running. You can change how often quest scripts are processed by changing a default variable in the quest's script. When a game is first loaded there will be a brief period when quest scripts will not run, even if fQuestDelayTime is very small. The first time a game is loaded in a given game session this delay will be longer, perhaps 5 seconds or so. This does not happen for other script types.
;References: Processed every frame when its cell is loaded, not at all when the cell is not loaded. So these scripts run only when the player is nearby (which means these are often a good place to put relatively expensive scripts, doing things like distance checks).
== Order of Script Processing ==
Scripts are run sequentially i.e., no two scripts ever run concurrently. The order in which they are processed is the same as the one by which their scripted objects were added to the game/brought into scope.
Quest scripts are processed before those running objects (scripts on active effects and inventory items). They follow the same order as the scripts on objects - The order in which their parent quest was added to the game ( essentially in order of their formIDs ).
== Remote Ref Heartbeat ==
| |||