Difference between revisions of "OnLoad"
Jump to navigation
Jump to search
imported>BonzoFSP (Transferred content from TES site. Disconnected from TES site.) |
imported>Tgspy (→Notes) |
||
Line 5: | Line 5: | ||
*[[OnLoad]] blocks won't run if you are entering a cell in which you have just left. | *[[OnLoad]] blocks won't run if you are entering a cell in which you have just left. | ||
*[[OnLoad]] blocks <em>will</em> run on disabled triggers, which is a side effect of the fact that they don't have regular 3D data. | *[[OnLoad]] blocks <em>will</em> run on disabled triggers, which is a side effect of the fact that they don't have regular 3D data. | ||
*[[OnLoad]] blocks shouldn't in practise be used for actors, especially if there is a large number of them present. Using [[OnLoad]] effectively stops the game engine for a brief number of ticks, and having dozens of [[OnLoad]] blocks being run at the same time can cause the game to "hang" for a brief second. | |||
==='''See Also'''=== | ==='''See Also'''=== | ||
*[[Running_an_OnLoad_block_on_a_disabled_item|Running an OnLoad block on a disabled item]] | *[[Running_an_OnLoad_block_on_a_disabled_item|Running an OnLoad block on a disabled item]] | ||
[[Category:Blocktypes]] | [[Category:Blocktypes]] |
Revision as of 07:13, 14 December 2016
This block will be run once whenever the scripted object's 3D loads, i.e. whenever the player enters the cell (interior) or the object's cell is loaded in the 5x5 grid of exterior cells around the player.
Notes
- OnLoad blocks won't run on most disabled objects, because their 3D data isn't loaded.
- OnLoad blocks won't run if you are entering a cell in which you have just left.
- OnLoad blocks will run on disabled triggers, which is a side effect of the fact that they don't have regular 3D data.
- OnLoad blocks shouldn't in practise be used for actors, especially if there is a large number of them present. Using OnLoad effectively stops the game engine for a brief number of ticks, and having dozens of OnLoad blocks being run at the same time can cause the game to "hang" for a brief second.