How to add a spell to player from a quest that has already b

Post » Thu Jun 21, 2012 3:43 am

So, I have a quest. It's already been started, and it's currently functioning.

I want the quest to automatically add a spell to my character (I've made a new functionality), but OnInit doesn't seem to work. Is it because the quest is already started? How do I add the spell to my character then?
User avatar
D IV
 
Posts: 3406
Joined: Fri Nov 24, 2006 1:32 am

Post » Thu Jun 21, 2012 8:24 am

put the addspell code in a quest stage, and use an external object to advance it to that stage.

if you cant use stages for whatever reason, you could run a parallel quest dedicated just to "control" your already running one. place the addspell in a function in the quest script and use the controll quest to call the function
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm

Post » Thu Jun 21, 2012 7:25 am

Isn't it, like, overkill to create another quest just for that? But I guess my option is limited. The quest is really just an excuse to add InventoryEventFilter and OnItemAdded event

Also, a question: If I load a save that haven't had this quest before, will OnInit fire and add the spell?

I'm thinking of deactivating the mod, saving, and reactivate it again. I've heard of the "script persists" stuff, but if I reactivate the quest, will the "persisted" script be replaced or still laying there dormant?
User avatar
matt
 
Posts: 3267
Joined: Wed May 30, 2007 10:17 am

Post » Thu Jun 21, 2012 1:05 pm

yea it should.

also in vanilla skyrim there are tons of quests that are solely for controlling other quests. its really the only way to non-sequentially leapfrog through stages, as a quest cannot set itself to a lower stage
User avatar
Kayla Keizer
 
Posts: 3357
Joined: Tue Dec 12, 2006 4:31 pm

Post » Thu Jun 21, 2012 7:29 am

When you say "yeah", are you talking about "brand new save will trigger on init" or "deactivating and reactivating should work"?
User avatar
Bethany Watkin
 
Posts: 3445
Joined: Sun Jul 23, 2006 4:13 pm

Post » Thu Jun 21, 2012 10:50 am

You can always load an old save from before you activated the mod the first time. That will cause everything to initialize again
User avatar
Spaceman
 
Posts: 3429
Joined: Wed May 23, 2007 10:09 am


Return to V - Skyrim