OnRead - ObjectReference Question ?

Post » Thu Jun 21, 2012 2:44 am

Does the OnRead funcion work on notes?

This one --> http://www.creationkit.com/OnRead_-_ObjectReference

I'm trying to create a quest, and the OnRead function isn't working as I was hoping... or I'm not doing it right ;P



This is my Script:

Scriptname NoteScriptQ1 extends Quest

Quest Property IntroQ1 Auto

Event OnRead()
IntroQ1.SetObjectiveCompleted(0)
IntroQ1.SetObjectiveCompleted(10)
IntroQ1.SetObjectiveDisplayed(20)
IntroQ1.SetStage(20)
EndEvent
User avatar
jessica Villacis
 
Posts: 3385
Joined: Tue Jan 23, 2007 2:03 pm

Post » Thu Jun 21, 2012 12:31 pm

OnRead is a function meant for ObjectReferences, so your script extending Quest won't work methinks. What you can do is set it to extend ObjectReference, then set the objective for the quest. The quest itself can handle doing the rest of the stuff with the Objectives when it hits the stage.
User avatar
brandon frier
 
Posts: 3422
Joined: Wed Oct 17, 2007 8:47 pm

Post » Thu Jun 21, 2012 11:30 am

So something like this then?

Scriptname NoteScriptQ1 extends ObjectReference

Quest Property IntroQ1 Auto

Event OnRead()
IntroQ1.SetObjectiveCompleted(0)
IntroQ1.SetObjectiveCompleted(10)
IntroQ1.SetObjectiveDisplayed(20)
IntroQ1.SetStage(20)
EndEvent
User avatar
Bethany Watkin
 
Posts: 3445
Joined: Sun Jul 23, 2006 4:13 pm

Post » Thu Jun 21, 2012 7:17 am

Just set the stage, and then inside the quest go to stages, then make a script for stage 20 that does the other three things.
User avatar
Trista Jim
 
Posts: 3308
Joined: Sat Aug 25, 2007 10:39 pm

Post » Thu Jun 21, 2012 4:47 am

I have done that... Basically, I drop this script into to reference of the note, referencing the quest, and nothing happens when it is read regardless, which is why I came here in the first place
User avatar
John N
 
Posts: 3458
Joined: Sun Aug 26, 2007 5:11 pm

Post » Thu Jun 21, 2012 4:07 am

If the book is an Alias of the Quest then:
  • Double-Click the BookAlias in the Quest
  • Add a new script to that Alias (not the book itself) - The script will extend ReferenceAlias
  • The OnRead event will then work for the Alias

Or, if the Book is NOT an Alias of the Quest:
  • Double Click on the Book Item (in Object Window)
  • Add a new script (to the book) - The script will extend ObjectReference
  • If you want to change the quest in some way, from the OnRead, add the QUEST as a property (Quest) to the script.
  • The OnRead will now work from the Book Base Object
:)
User avatar
Conor Byrne
 
Posts: 3411
Joined: Wed Jul 11, 2007 3:37 pm

Post » Thu Jun 21, 2012 1:36 pm

I feel like I have tried all that and nothing has happened... but I will give it another shot from scratch I think
User avatar
Natalie J Webster
 
Posts: 3488
Joined: Tue Jul 25, 2006 1:35 pm


Return to V - Skyrim