Extragorey Posted November 24, 2012 Share Posted November 24, 2012 (edited) Hey guys, I've written a script that I want to run whenever the player advances a level in a specified skill.I've used the "OnStoryIncreaseSkill(string asSkill)" event, and I was just wondering how I'd actually go about attaching this to the quest level-up script or something so it's actually called when the player levels up a skill. Does anyone know what I'd have to do? Edited November 24, 2012 by Teh Masterer Link to comment Share on other sites More sharing options...
DreamKingMods Posted November 24, 2012 Share Posted November 24, 2012 You can have a quest run when the player advances any skill, but there does not seem to be a direct way to have it only run when a specific skill increases. Rather, you'd need to capture that logic in your script--test what "asSkill" is in the script event and take one action if it is the skill you care about, another action (stop the quest) if it is not. Beyond that, you'll need to add your quest to Story Manager's "Skill Increase" event. Go to "SM Event Node" in the Object Window, choose "Skill Increase," right-click the topmost entry and add a new Stacked Quest Node, give it a unique ID and check "Shares Event," drag it so it is first in the list, then right click it, choose "Add Quests," then add your quest. The quest will need to be selected to run on the Skill Increase event in its Quest Data tab, and remember that Story Manager will only start a quest if it is not already running, so be sure to stop your quest after it does whatever it does. Link to comment Share on other sites More sharing options...
Extragorey Posted November 24, 2012 Author Share Posted November 24, 2012 Thanks, that's very helpful. I'll have a crack at doing all that tomorrow, but for now can you tell me how I'd stop the quest once the script has completed? Link to comment Share on other sites More sharing options...
DreamKingMods Posted November 24, 2012 Share Posted November 24, 2012 can you tell me how I'd stop the quest once the script has completed? It depends on what the quest is doing; the simplest way is to just use the Stop() function in your quest script. Link to comment Share on other sites More sharing options...
Extragorey Posted November 25, 2012 Author Share Posted November 25, 2012 Thank you so much for your help - I've gotten it all working now! You can check it out here if you're interested: http://skyrim.nexusmods.com/mods/8641/ Link to comment Share on other sites More sharing options...
Recommended Posts