Noggog Posted July 7, 2011 Share Posted July 7, 2011 Is there a way to tell whether an object (or maybe the cell the object is located in) is loaded in memory? I want to make sure an OnLoad block will run, as it won't run if it's already loaded in memory. Any ideas? Link to comment Share on other sites More sharing options...
AlexxEG Posted July 7, 2011 Share Posted July 7, 2011 (edited) You can try this: int iDoOnce Begin GameMode if ( iDoOnce == 0 ) ;Do Whatever you want after it been loaded. Set iDoOnce to 1 ;Make sure it's only done once. else endif End This is Fallout 3 syntax, but I guess it's the same in Oblivion or Morrowind. Edited July 7, 2011 by Alexx378 Link to comment Share on other sites More sharing options...
Noggog Posted July 14, 2011 Author Share Posted July 14, 2011 Thanks! But I'm looking for a way to make sure this specific script block runs every time a PC enters a cell, not just once, but every time it happens. Link to comment Share on other sites More sharing options...
Grumpf_be Posted July 14, 2011 Share Posted July 14, 2011 Is this cell inside our outside? If it's inside, you can script the door(s) to reset the "doonce", if it's outside you can check the gamemode block about player being in the cell or not and reset the "doonce". I suggest creating a quest script to keep the variables. Now if you tell us what you really want to achieve it may be easier... Cheers. Link to comment Share on other sites More sharing options...
documn Posted July 14, 2011 Share Posted July 14, 2011 How about using GetCellChanged in a gamemode block?http://cs.elderscrolls.com/constwiki/index.php/GetCellChanged Link to comment Share on other sites More sharing options...
Vagrant0 Posted July 17, 2011 Share Posted July 17, 2011 Scripted activators will only run if they are in an active cell. So, by virtue of anything inside a gamemode block on an activator, the block will only run when the player is nearby and isn't looking at a menu. You can test this for yourself by placing a scripted object in any unreachable cell with a gamemode block that spams the player with a message. The message will only be sent to the player when that cell is loaded. Link to comment Share on other sites More sharing options...
troybayliss Posted July 18, 2011 Share Posted July 18, 2011 I think the only way to be sure an OnLoad block will run is to use PCB when you are not in cell with the scripted object. Link to comment Share on other sites More sharing options...
Recommended Posts