Talk:Quest scripts

Active discussions

Is that right?Edit

  • When would the "frame sync" be a problem? You can set it so it runs on the 1st frame, then the 2nd frame, then the 4th frame, etc. but does that really cause any problems?
  • Also, I've run around a bit with both an object and a quest script running every frame - and indeed they both ran every frame. Are there circumstances where they don't?
  • Spells can run in Travel and Wait menus too, can't they?
  • Does anyone remember the particulars about quest variables resetting? (start a quest while it's running?)

--Haama 21:03, 10 February 2008 (EST)

  • I've seen some oddities when using a quest script to constantly move an object via SetPos. Eg the object moves smoothly most of the time, but will occaisionally "jerk" as though it wasn't being updated regularly. Whether that's a quirk of the engine or an actual sync issue I couldn't say.
  • Correct me if I'm wrong, but even quest scripts can only process once per frame, right? Meaning if you set fQuestDelayTime to 0.01, your script will only actually run 100 times per second if the game processes 100+ frames in that second. So as long as (fQuestDelayTime * 10^4) > (frames being processed per second), the quest should process every frame.
  • Not sure about that one
  • AFAIK it's only when you call StartQuest while the script is running.
--Speedo 15:31, 16 February 2008 (EST)

Why is this?Edit

Set fQuestDelayTime to how often you want the quest script to process, in seconds. If you set it to something very small (.01), it will effectively process every frame. If you set it to 0, the quest script will revert to the default processing time (every 5 seconds). Use this feature with caution -- in general, fQuestDelayTime should only be set less than 5 under very controlled and limited circumstances.
Woe unto you should you try this..... whats the big deal?
--Antares 22:20, 15 October 2008 (EDT)

I believe it is because if you have too many scripts running every frame, then you will lag the game out. The effect is similar to that of putting lots of objects in a room with a GameMode block constantly running - except Quest scripts run in every cell.
--Grosie 16:40, 11 October 2009 (EDT)
What it comes down to is that you shouldn't use it unless you need to. Wasting processing time is a waste, and that is not good.
However, it's very hard to cause any noticeable performance issues with script. Very, very hard. 90%, if not more, of performance issues are entirely related to graphics issues, and easily 50% of the remainder is from areas overly-crowded with NPCs. Scripts fall very far down the list of performance priorities. You should keep your code neat and efficient where possible, but there is no reason to restrict yourself.
Dragoon Wraith TALK 16:47, 11 October 2009 (EDT)

Cannot Set fQuestDelayTimeEdit

When trying to set fQuestDelayTime, my script wont compile - saying that the variable doesn't exist. I am running the latest version of the CS and of OBSE. Any ideas? --Grosie 16:43, 11 October 2009 (EDT)

You will need to declare it first. Even though it seems like something that should be implicitly declared in a quest script, you still have too. Icewedge 21:25, 13 October 2009 (EDT)
Return to "Quest scripts" page.