Difference between revisions of "Quest scripts"
no edit summary
imported>GuidoBot |
imported>GuidoBot |
||
Line 13: | Line 13: | ||
* Declare the "magic variable" '''float fQuestDelayTime''' in your quest script. | * Declare the "magic variable" '''float fQuestDelayTime''' in your quest script. | ||
* 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. | * 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. | ||
* fQuestDelayTime may be set from another script by addressing the quest, e.g. '''set MyQuestFunction.fQuestDelayTime to 0.01''' | * fQuestDelayTime may be set from another script by addressing the quest, e.g. '''set MyQuestFunction.fQuestDelayTime to 0.01'''. | ||
* When using quest scripts to perform some function it always a good idea to use some sort of flag at the very start of the GameMode block to ensure the script is only run at times you want it to. | * When using quest scripts to perform some function it always a good idea to use some sort of flag at the very start of the GameMode block to ensure the script is only run at times you want it to. | ||
* Quest scripts are the only ones that actually process a MenuMode block while you are resting or using fast travel. | * Quest scripts are the only ones that actually process a MenuMode block while you are resting or using fast travel. |