Jump to content

Recommended Posts

Posted

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?

Posted (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 by Alexx378
Posted
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.
Posted

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.

Posted
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.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...