javaplaza Posted May 7, 2019 Author Share Posted May 7, 2019 so just making sure i can have two events in the same script?and two different Int properties? Link to comment Share on other sites More sharing options...
jguenard Posted May 7, 2019 Share Posted May 7, 2019 try putting a wait command in the onRead just before the set stage. Utility.wait(0.5) Link to comment Share on other sites More sharing options...
javaplaza Posted May 7, 2019 Author Share Posted May 7, 2019 will try that now, appreciate the suggestion how would this help exactly? i use it on my debug message Link to comment Share on other sites More sharing options...
Hoamaii Posted May 7, 2019 Share Posted May 7, 2019 Have you tried "OnActivate(ObjectReference akActionRef)" instead of "OnRead()"? It's been a while since I haven't used this function but I vaguely remember I has some issues with some notes too. Not sure if that's your issue, but if your note moves from within a container (satchel) into another container (player), the game probably does not load it and unloaded refs' scripts don't fire. Try dropping the note, then picking it up to read it, see if your script fires then. Link to comment Share on other sites More sharing options...
javaplaza Posted May 7, 2019 Author Share Posted May 7, 2019 The only way I've found it to slightly work is when the script is only attached to the letter itself the onread doesn't work yetbut when you take it, the quest completes immediately. Scriptname a027_QSuDBookScript extends ObjectReference Quest Property QSuDBookProp Auto Quest Property MyQuest Auto int Property readStage Auto int Property takeStage Auto event onRead() Utility.wait(0.5) MyQuest.SetStage(readStage) endEvent Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if (akNewContainer == Game.GetPlayer()) MyQuest.setStage(takeStage) EndIf EndEvent Link to comment Share on other sites More sharing options...
javaplaza Posted May 7, 2019 Author Share Posted May 7, 2019 (edited) Hoamii .. i changed the scene to have the letter sitting out , per what u said, and the quest did not start. however after picking it up, and dropping it. Reading it after dropping it started the quest!!! Such a good sight to see.. i have a tut for onactivate i havent watched yet, ill start that now and give it a try, since i want this to work the first time you try to read it :wink: edit :: can i use onActivate on a book/note ? Edited May 7, 2019 by javaplaza Link to comment Share on other sites More sharing options...
javaplaza Posted May 7, 2019 Author Share Posted May 7, 2019 can i use Oninit to fix this issue? I really want the onread to work the first time the game probably does not load it and unloaded refs' scripts don't fire. Link to comment Share on other sites More sharing options...
maxarturo Posted May 7, 2019 Share Posted May 7, 2019 (edited) Sometimes like with the "OnReadSetStage" you might need to put - add a fail safe. 1) First add the "OnRead" Script on the note's Reference menu, add localy. 2) Also add the "OnRead" on the quest menu, as a fail safe, so if the one dosen't fire the other will. (this is one of the strange bugs i've found in quest making). * I still don't understand why not use the defaults vanilla script as is. Edited May 7, 2019 by maxarturo Link to comment Share on other sites More sharing options...
javaplaza Posted May 7, 2019 Author Share Posted May 7, 2019 (edited) max you said that last time, and im literally copy/pasting the script from another script within the game... is that not vanilla? edit... as i was watching a tutorial for onactivate just now.. it hit me what you're suggestingyou mean for me to use the scripts in the rar file from bethesda ? i guess i hadn't thought of that, im still a novice still doesn't work..lol Edited May 7, 2019 by javaplaza Link to comment Share on other sites More sharing options...
Hoamaii Posted May 7, 2019 Share Posted May 7, 2019 A. If the script fires when you drop the note and pick it up - and it starts your quest as you want it to, that means your script works fine. B. If the same script does not work when the note sits in the world and you pick it up to read it (without dropping it first), that means "onRead()" simply does not fire in that instance. For some reason, the game does not consider it as "read" even though your note is obviously loaded. Several possible workarounds to figure out what's going on and find a solution:1. Try placing your "OnRead()" script on a book instead of a note, just for test. If it fires, that means your issue is with notes - "OnRead()" still works but not for notes. If that's the case, you can stop trying to use it on a note. 2. Try "OnActivate(...)" on your in-world note. 3. Try "OnEquipped()" on your in-world note. 4. Try "OnGrab()" on your in-world note.5. I read you've tried "OnContainerChanged()" - but did it work when you set it up to start the quest instead of ending it? To answer your question above: when placed on an object, "OnInit()" will fire as soon as the object is loaded by the game. If it sits in the world, it'll fire the moment you enter the cell which holds it, and that's long before the player even grabs it. If it's sitting in a container the moment you load your game, your "OnInit()" event will only fire the first time your object has 3D loaded, in this instance when you drop it. There's yet another instance when "OnInit() will fire, it's when the script is placed on a craftable object, it will fire every time you craft a new instance of the object (even though, technically you'd think it's not 3D loaded). Link to comment Share on other sites More sharing options...
Recommended Posts