Having trouble getting a script in a quest to run

Post » Fri Jan 04, 2013 5:22 am

I'm trying to make the script update the quest and enable an actor once a journal is picked up, but for some reason it's not running when I pick up the journal. I based the script, and the quest itself, off of the MS01 quest which does the same thing. (MS01 is the Forsworn Conspiracy quest and they use a script just like this to update the quest after you acquire Margret's journal) Though my script is much smaller because the MS01 script updates for a bunch of other journals, it's structure is identical. I'm even using the same book as MS01 to update my quest! Here is the script I'm using.



Scriptname AAs2hTFCEnableDecimusScript extends ReferenceAlias  {Enables Decimus after acquiring the journal}  Book Property MS01MargretJournal  AutoReferenceAlias Property Alias_Decimus  AutoEvent OnInit()AddInventoryEventFilter(MS01MargretJournal)EndEvent  Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)If (akBaseItem == MS01MargretJournal)Alias_Decimus.GetReference().Enable()GetOwningQuest().SetStage(10)EndIfEndEvent

Just like the script from MS01 that this is based off of, this one is attached to the alias "player" within my quest and refers to the unique actor: Player. When I pick up the book MS01 updates it's quest, but mine doesn't do anything at all. I don't understand why this isn't working when it's pretty much a copy of the vanilla quest. Anyone have any ideas what I'm doing wrong?
User avatar
michael flanigan
 
Posts: 3449
Joined: Thu Jun 14, 2007 2:33 pm

Post » Fri Jan 04, 2013 12:50 pm

Have you set up all of your properties correctly?
User avatar
louise tagg
 
Posts: 3394
Joined: Sun Aug 06, 2006 8:32 am

Post » Fri Jan 04, 2013 12:38 am

Well the script saved without any errors, so I assume so. But even if I were to remove the bit about decimus the quest still doesn't update. So the only property of any significance is the bit about MS01MargretJournal, and that I set up to be identical to the way the vanilla quest had it. I didn't copy and paste that value, if that's what you are asking. I added that property via the "add property" button. So the properties are set up correctly as far as I can tell.
User avatar
Baby K(:
 
Posts: 3395
Joined: Thu Nov 09, 2006 9:07 pm

Post » Fri Jan 04, 2013 7:10 am

How about tackling it from a slightly different angle.

I've edited your above script. Attach it to the Base Object of your book. It'll trigger when the book enters the players inventory:

Scriptname AAs2hTFCEnableDecimusScript extends ObjectReference{Enables Decimus after acquiring the journal}  Quest Property myQuest  AutoReferenceAlias Property Alias_Decimus  AutoEvent OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)   If (akNewContainer == Game.GetPlayer()Alias_Decimus.GetReference().Enable()      myQuest.SetStage(10)   EndIfEndEvent

Just remember to fill the properties and you should be good to go

- Hypno
User avatar
Lalla Vu
 
Posts: 3411
Joined: Wed Jul 19, 2006 9:40 am

Post » Fri Jan 04, 2013 8:01 am

Haha nevermind.
User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Fri Jan 04, 2013 9:35 am

I was hoping to get away without altering anything that had to do with the original quest, but if that's what it'll take to make it work I'll do it. Thanks for the help. I'll report back if I have any more trouble.
User avatar
Latino HeaT
 
Posts: 3402
Joined: Thu Nov 08, 2007 6:21 pm


Return to V - Skyrim