Talk:OnLoad

Revision as of 10:27, 23 May 2006 by imported>DragoonWraith (info on GetInSameCell?)

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)

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)
Return to "OnLoad" page.