Jump to content

Quest Stage Scripting Question


Vandrath

Recommended Posts

I was wondering if it would be possible to have a quest select a quest stage randomly (through a script or through conditions).

Here is my train of thought for this idea.

 

on Quest stage 10 start - choose randomly between quest stages 20, 30, and 40, then set stage to chosen stage number (without SKSE).

 

This is a concept idea for my next mod and while my scripting skill is intermediate at best I am still not good with this type of problem (im assuming i will have to work with arrays and they frustrate me a lot). Any help would be greatly appreciated.

Link to comment
Share on other sites

No need for arrays, I think you can just have something like this in the script for stage 10:

 

int RandomStage = Utility.RandomInt(2,4) * 10
SetCurrentStageID(RandomStage)

 

The Utility.RandomInt function takes minimum/maximum values, so here it'll pick a random integer between 2 and 4, multiply that by 10 to get your 20, 30, or 40, and feed that into the SetCurrentStageID (AKA SetStage) function.

Edited by DreamKingMods
Link to comment
Share on other sites

  • Recently Browsing   0 members

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