Difference between revisions of "Talk:OnLoad"
imported>Nezroy m |
imported>Antares (Question: OnLoad and implementation on dynamic references) |
||
Line 9: | Line 9: | ||
:::Argh, why is this so complicated? I want CellChanged back! Anyway, is there any information anywhere on how [[GetInSameCell]] works (or doesn't)? --[[User:DragoonWraith|DragoonWraith]] 11:27, 23 May 2006 (EDT) | :::Argh, why is this so complicated? I want CellChanged back! Anyway, is there any information anywhere on how [[GetInSameCell]] works (or doesn't)? --[[User:DragoonWraith|DragoonWraith]] 11:27, 23 May 2006 (EDT) | ||
==Using OnLoad with Dynamic References== | |||
Is there any way to use an OnLoad block for a dynamic reference? In my specific instance I am ''spawning'' a statue (which is in fact an NPC) and wish to play the stone effect shader on it. Gamemode does work but if you should enter the console, inventory, wait screens the effectshader doesn't play. OnLoad should hypothetically cover all scenario's as the Objects 3D is always loaded in real time. If there is a solution that doesnt involve having the statue spawning activator in a different cell I would like to hear it.<BR> | |||
--[[User:Antares|Antares]] 23:49, 7 September 2008 (EDT) |
Revision as of 22:49, 7 September 2008
Regarding Rez's note, I think it's even less predictable than when the player has just left that cell. I can hop multiple cells before coming back, still without triggering an OnLoad sometimes. Just a matter of what the engine chooses to keep cached, I guess. So on that note, does anyone have an effective, efficient solution for the problem of: how do I reliably determine when the player has just entered my cell? -- Nezroy 11:08, 8 May 2006 (EDT)
- How about "GetInSameCell player" on an object in the cell? You'd have to call it every second or so but it would work. --JustTim 15:00, 8 May 2006 (EDT)
- Two issues with that approach:
- First, once you leave the cell, the gamemode script for the object stops running, so in effect, any time the object script is running, GetInSameCell player will be true by definition. However, if you stick that in a quest script instead that is constantly running, it will work. Perhaps that's what you meant anyhow :)
- Second, reports on the forums indicate that GetInSameCell appears to be pretty chaotic with the values it returns, making it more or less useless, even in a quest script. I haven't verified that myself though, so I will have to look into it further. Regardless, we can accomplish the same thing through a xref'd counter, but the basic issue still remains that we have to call this repeatedly in an always-running quest script, which just seems like way too much overhead for such a simple task.
- I do think it's a viable, working solution, I just find it unsatisfactory :) This general idea has also been under discussion in this thread. -- Nezroy 16:04, 8 May 2006 (EDT)
- Two issues with that approach:
- Argh, why is this so complicated? I want CellChanged back! Anyway, is there any information anywhere on how GetInSameCell works (or doesn't)? --DragoonWraith 11:27, 23 May 2006 (EDT)
Using OnLoad with Dynamic References
Is there any way to use an OnLoad block for a dynamic reference? In my specific instance I am spawning a statue (which is in fact an NPC) and wish to play the stone effect shader on it. Gamemode does work but if you should enter the console, inventory, wait screens the effectshader doesn't play. OnLoad should hypothetically cover all scenario's as the Objects 3D is always loaded in real time. If there is a solution that doesnt involve having the statue spawning activator in a different cell I would like to hear it.
--Antares 23:49, 7 September 2008 (EDT)