Some Confusion re: OnStoryxxx Events

Post » Thu Jun 21, 2012 7:39 am

For example, OnStoryIncreaseSkill... its wiki page says: "Event called when this quest is started via an increase level story manager event."

What exactly does that mean? Do I have to link my quest up to the story manager? Or can I start it enabled, and it will know to listen to the increase skill event?

If I want a script to run every time the player increases a skill or her overall level, is this function (and functions like it) the best way to do that? Is there a better way?
User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Thu Jun 21, 2012 6:41 am

You need to link your quest under the appropriate event in the Story Manager Event Node list for the relevant OnStory event to be sent to your quest script, yes. For compatibility reasons it's best to create a new "top-level" Branch or Quest Node within the event node, and make sure you have "Shares Event" checked.

There's a good tutorial on it all at http://www.creationkit.com/Bethesda_Tutorial_Story_Manager.
User avatar
Amy Masters
 
Posts: 3277
Joined: Thu Jun 22, 2006 10:26 am

Post » Thu Jun 21, 2012 7:46 am

Ah, alright, I see, thanks!

If my quest has already started (say, the last time the player leveled), will the event still fire it off again? Or should I make sure to shut down my quest once the script has run for that particular instance of the event?
User avatar
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Post » Wed Jun 20, 2012 11:21 pm

I don't know--I've been stopping my SM-managed quests just so they're not using whatever miniscule amount of CPU resources an active quests uses, but I'd guess the event would still be passed to the quest if the quest was already running.
User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am

Post » Thu Jun 21, 2012 2:01 am

During my testing for ASAP, I fould that if I didn't have a stop() at the end of my quest script, the quest would only run once unless reset in the console.
User avatar
^~LIL B0NE5~^
 
Posts: 3449
Joined: Wed Oct 31, 2007 12:38 pm


Return to V - Skyrim