Difference between revisions of "SetQuestDelay"
Jump to navigation
Jump to search
imported>Lap |
imported>Lap |
||
Line 23: | Line 23: | ||
*Setting delay to 0 tells the quest to process at the INI setting default (5 seconds). | *Setting delay to 0 tells the quest to process at the INI setting default (5 seconds). | ||
Using GetSecondsPassed with a quest script will cause it to multiply the real time seconds by it's scripting delay. So if the delay was 0.5, GetSecondsPassed would actual report double. -Lap | *Using GetSecondsPassed with a quest script will cause it to multiply the real time seconds by it's scripting delay. So if the delay was 0.5, GetSecondsPassed would actual report double. -Lap | ||
=='''See Also'''== | =='''See Also'''== |
Revision as of 23:07, 12 January 2009
Description
SetQuestDelay modifies the processing time delay for a script.
By default, quest scripts process every 5 seconds (this is based on an INI setting). This is to prevent the quest scripts from taking up an excessive amount of processor time. Unless you have a good reason, you should leave the quest script processing every 5 seconds.
Good reasons include:
- The quest script is running a timer which requires precise timing (e.g. for dialogue).
- The quest script needs to react to something with precise timing (e.g. to trigger different parts of a scene).
Even when you have a good reason, avoid setting the quest delay time to .1, or any other low number, for the duration of a quest. Under almost all circumstances, set the quest delay to a low number for a specific purpose, and when that purpose is finished, set it back to the default.
Syntax
SetQuestDelay QuestName, DelayTimer
Examples
SetQuestDelay MyQuest .1
Scripts in MyQuest will process every .1 seconds.
Notes
- Setting delay to 0 tells the quest to process at the INI setting default (5 seconds).
- Using GetSecondsPassed with a quest script will cause it to multiply the real time seconds by it's scripting delay. So if the delay was 0.5, GetSecondsPassed would actual report double. -Lap
See Also
- None