Difference between revisions of "OnLoad"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Cipscis
m (Formatting fix - made link display text with spaces instead of underscores)
imported>Tgspy
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Link to TES4 Construction Set Wiki: [http://cs.elderscrolls.com/constwiki/index.php/OnLoad OnLoad].
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.
 
==Example==
Begin OnLoad
  placeatme GrenadeFragExplosion
end
 
==='''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 <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]]

Latest revision as of 07:19, 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.

Example[edit | edit source]

Begin OnLoad
 placeatme GrenadeFragExplosion
end

Notes[edit | edit source]

  • 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.

See Also[edit | edit source]