Guest Messenjah Posted August 25, 2011 Share Posted August 25, 2011 Well, some good news, it is not the timers at fault in my script. It is the GetInCell and DoOnce and the fact that my script is linked to an activator. I created a simplified version of my script without the timers to figure out what was wrong. What I found out, is that when I added a playsound script to these scripts, and I used an else command, it would cycle over and over and over. I believe it is because the else statement does not specify any conditions so any condition will cause it to default DoOnce back if it is told to do so with an else command, so you must be more specific. Furthermore, you need to define your GetInCell a bit better by making a statement elseif GetInCell blahblahblah == 0 instead of using else in order to tell to look for when the player is outside the cell. HOWEVER, if the script is attached to an activator, that activator apparently can not look beyond the cell it is located in. It will not look to see if the player is outside of the cell anyway or allow for it because the script will not continue to run outside of the cell it is located in.... at least I believe this is how it must work. So, I created a quest and quests work outside of cells so they will be able to see if the player is located inside a cell or not. The only thing that I worry about, is having a quest script with begin GameMode.... why? Because GameMode scripts run at every frame to my understanding, so even if I put a DoOnce in to attempt to block it from running... will it still continue to run, causing a script to run constantly within the background needlessly? I like most of my stuff to remain self-contained so if there is a bug, or if too much is running, it will only do so inside the cell it is located in, in order to be easier to fix. If this is true, then perhaps it would be more efficient to create a trigger with a timer and a DoOnce script that turns on the timer inside the cell and then have a second trigger to turn it off and run DoOnce in the cell that the door connects to on the other side? Might could even link the turn off script to the door itself? Thoughts? Link to comment Share on other sites More sharing options...
Recommended Posts