Difference between revisions of "SetStage"
Jump to navigation
Jump to search
imported>JOG (Layout, see also, minor editing) |
imported>Vswe m (Added Search Terms) |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 6: | Line 6: | ||
Sets the specified quest stage to "Completed", and resolves any of the attached stage items that pass their conditions (runs results, adds to quest log, completes the quest if it should). | Sets the specified quest stage to "Completed", and resolves any of the attached stage items that pass their conditions (runs results, adds to quest log, completes the quest if it should). | ||
==Notes== | |||
*If this is the first stage of the quest to be added to the journal, the player will receive a "Quest Added" message on screen. | *If this is the first stage of the quest to be added to the journal, the player will receive a "Quest Added" message on screen. | ||
Line 13: | Line 12: | ||
*If the quest is not currently running, SetStage will automatically start it. | *If the quest is not currently running, SetStage will automatically start it. | ||
*Always remember that Setstage only accepts stages that are defined in the quest's "Quest Stages" tab. When you try to set a quest stage that isn't defined, | *Always remember that Setstage only accepts stages that are defined in the quest's "Quest Stages" tab. When you try to set a quest stage that isn't defined, the stage-index doesn't change at all. | ||
*The stage result script will be | *The stage result script will be processed immediately after the SetStage call. The main script containing the SetStage call will be halted until the result script is finished. It is even possible to use the SetStage command inside a stage result script. In this case the new stage result script will run in place of the SetStage command and the old stage result script will continue after the new one has finished. Unlike [[Activate]], it seems that any number of recursive SetStages are allowed (at least 250, tested from the same quest, are possible). | ||
*It is NOT possible to define variables inside a stage result script! The script will compile, but the variables will always be 0. | *It is NOT possible to define variables inside a stage result script! The script will compile, but the variables will always be 0. | ||
==See Also== | ==See Also== | ||
[[GetStage]] | *[[GetStage]] | ||
*[[GetStageDone]] | |||
[[GetStageDone]] | |||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category:Functions (CS)]] | |||
[[Category: Functions (CS 1.0)]] | |||
[[Category: Quest Functions]] | [[Category: Quest Functions]] | ||
[[Category: Quest Functions (CS 1.0)]] | |||
<!-- Begin Search Terms | |||
Set | |||
Stage | |||
End Search Terms --> |
Latest revision as of 14:55, 20 June 2008
Syntax:
SetStage QuestID StageIndex
Example:
SetStage MS27 30
Sets the specified quest stage to "Completed", and resolves any of the attached stage items that pass their conditions (runs results, adds to quest log, completes the quest if it should).
Notes[edit | edit source]
- If this is the first stage of the quest to be added to the journal, the player will receive a "Quest Added" message on screen.
- If the quest is not currently running, SetStage will automatically start it.
- Always remember that Setstage only accepts stages that are defined in the quest's "Quest Stages" tab. When you try to set a quest stage that isn't defined, the stage-index doesn't change at all.
- The stage result script will be processed immediately after the SetStage call. The main script containing the SetStage call will be halted until the result script is finished. It is even possible to use the SetStage command inside a stage result script. In this case the new stage result script will run in place of the SetStage command and the old stage result script will continue after the new one has finished. Unlike Activate, it seems that any number of recursive SetStages are allowed (at least 250, tested from the same quest, are possible).
- It is NOT possible to define variables inside a stage result script! The script will compile, but the variables will always be 0.
See Also[edit | edit source]