Difference between revisions of "Talk:OnLoad"

Jump to navigation Jump to search
962 bytes added ,  01:45, 8 September 2008
Theory -- Why it doesn't always work
imported>QQuix
(Answer to Antares)
imported>Quetzilla
(Theory -- Why it doesn't always work)
Line 14: Line 14:
--[[User:Antares|Antares]] 23:49, 7 September 2008 (EDT)
--[[User:Antares|Antares]] 23:49, 7 September 2008 (EDT)
:The OnLoad block does work on Dynamic objects, including NPCs, but be aware that this block does not run on all ‘3D loads’(see above). If you are creating the NPC with PlaceAtMe, you can get a ref to it with GetSelf. I am not familiar with effect shaders, so this is all I can help you with. [[User:QQuix|QQuix]] 00:38, 8 September 2008 (EDT)
:The OnLoad block does work on Dynamic objects, including NPCs, but be aware that this block does not run on all ‘3D loads’(see above). If you are creating the NPC with PlaceAtMe, you can get a ref to it with GetSelf. I am not familiar with effect shaders, so this is all I can help you with. [[User:QQuix|QQuix]] 00:38, 8 September 2008 (EDT)
== Theory -- Why it doesn't always work ==
Was looking at the discussion from 2006 and I'm guessing the reason that it doesn't trigger when you exit a cell and re-enter is due to the cell buffer -- recently loaded cells are kept in memory, therefore they are not 'reloaded' when the player returns.  If this is true, then it should be possible to call PurgeCellBuffers before a cell change (or probably more conveniently after a cell change) which will then ensure that OnLoad blocks re-trigger properly.  The downside of course is that the cell will have to re load each time, defeating the purpose of the Cell Buffer in the first place.  May not be an issue on systems with fast hard drives (RAI or /SSD for example).<br>
I don't have a computer capable of oblivion at the moment so if someone wants to test my theory that would be great, and then it could get added to the main article page.<br>
--[[User:Quetzilla|quetzilla]] 02:45, 8 September 2008 (EDT)
Anonymous user

Navigation menu