Jump to content

Quest allow repeated stages & GetStage


SKKmods

Recommended Posts

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 Wait

Stage 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

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 by Carreau
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...