Difference between revisions of "OnLoad"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Tgspy
imported>Tgspy
 
Line 1: Line 1:
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.
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'''===
==='''Notes'''===

Latest revision as of 08: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]