SKKmods Posted August 3, 2018 Share Posted August 3, 2018 When a quest allows repeated stages so the flow can regress stages, is there nay neat way to get the actual current stage ? GetCurrentStageID & GetStage return the highest stage not the actual stage. Imagine a loop where an NPC could be waiting or following: Stage 10 NPC WaitStage 20 NPC Follow Once they have followed SetStage 20 and been booted back to Setstage 10, GetCurrentStageID & GetStage still report the highest stage reached of 20. I have been using counters to manage states, so it appears that quest stages are actually rather useless state managers if they are repeated. Any better ideas ? Link to comment Share on other sites More sharing options...
Carreau Posted August 3, 2018 Share Posted August 3, 2018 (edited) Vanilla uses counters as well. All of the caravans are on loops. A script on the package advances a counter and changes a flag state based either on reaching the destination or a timer firing. These play into the package conditions that are on each caravanâs ai stack. I think since youâre just wanting to check state based on the stage, use a global as a flag or just have it set bybscript fragment on that stage equal to the stage (so you can trend multiple stages) and check the value of the global in your condition. Edited August 3, 2018 by Carreau Link to comment Share on other sites More sharing options...
Evangela Posted August 3, 2018 Share Posted August 3, 2018 Just gonna say, if you try to get around this using IsStageDone, it doesn't help when I tested this theory for Skyrim. It will return true for stages that aren't current but were set before, if that makes any sense. I had thought that it would at least return false for stages not called a second time :/. Link to comment Share on other sites More sharing options...
SKKmods Posted August 3, 2018 Author Share Posted August 3, 2018 OK thanks, so its a known limitation. CK updated. Link to comment Share on other sites More sharing options...
Recommended Posts