Kurzusseus Posted March 31, 2014 Share Posted March 31, 2014 (edited) Hello I'm working on a mod and I'm having a dragon give a quest. I want him to then fly away after telling youwhat to do and he is disabled as to prevent the character from following him to an area nearby and waiting theredoing nothing. Currently he is disabled as I want him to be until the quest is started. In the quest stages, how can I enable, disable and object? I thought it was like the Geck or Geck NV edition code below. DragonRef.Enable DragonRef.DisableBut that is not the case, how can I disable and enable an object or npc using quest stage papyrus? (yes I'm aware of my typo on scripts, major accident.) Edited March 31, 2014 by FalloutZaxus Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 31, 2014 Share Posted March 31, 2014 Not knowing anything about Geck scripting (so no idea what the typo you are talking about would be), the first thing that is missing are the parenthesis "()" after both Enable and Disable. The other thing is that both functions are on the ObjectReference script and you are trying to run it with a ReferenceAlias (I'm assuming a reference alias since you are talking about it taking place within a quest and controlled by the quest). Considering all that you might want to try the following: (DragonRef.GetReference()).Enable() (DragonRef.GetReference()).Disable() Link to comment Share on other sites More sharing options...
Kurzusseus Posted March 31, 2014 Author Share Posted March 31, 2014 Thank you. this appeared to work. I'll test it in game when I'm ready.May I ask one final question? How can I link 1 quest stage from another? The idea is to automatically start this questafter completing unbound. I figured (GetQuest QuestID setstage (5)()) woulld work, but it didn't. (p.s the typo is in the title of this question itself. I put Enabling Disabling Objects with Scrips in Quest) Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 31, 2014 Share Posted March 31, 2014 Without editing the Unbound quest, I think it could be something like... UNTESTED On a new quest that is start game enabled, assign a player alias and add the following Quest Property UnboundQuest Auto {Assign the Unbound Quest here should be MQ101 but I will leave room for error} Quest Property YourRealQuest Auto {Assign the quest you want to take place after MQ101} Event OnInit() If QuestCheck() == false RegisterForUpdate(60) ;calls for a 60 second real time update EndIf EndEvent Event OnUpdate() If QuestCheck() == false RegisterForUpdate(60) ;Keep repeating the update call as long as the function returns false EndIf EndEvent bool Function QuestCheck() bool result = false If UnboundQuest.GetStage() >= 900 ;unbound itself is not quite over or could be over and the player has escaped everything and is free to do as they wish YourRealQuest.Start() result = true EndIf return result EndFunction Then on a script assigned to your real quest add the following Quest Property TheEnablingQuest Auto {Assign the start game enabled quest here} Event OnInit() TheEnablingQuest.Stop() EndEvent However, checking for Unbound to be finished can cause issues with alternate start type of mods. Meaning those users may not get the quest till much later. If that is not an issue, then everything is fine. If it is an issue, then some kind of work around would be needed for those users. There may be other methods to perform the same thing. Hopefully, some may come along and share them. Link to comment Share on other sites More sharing options...
Kurzusseus Posted March 31, 2014 Author Share Posted March 31, 2014 Ok thanks for the post. I'll try and test these scripts to see if they work. I'm new to scripting on the creation kit, but on the geck creation kit scripting was much much easierso I kinda know what I'm working with here. I kinda had a work around for those who don't have Unbound completed with an alternative start.I planned to put a book that simply starts the quest. So it shouldn't be too hard to add a script function to make the queststart when reading the book. Link to comment Share on other sites More sharing options...
Kurzusseus Posted March 31, 2014 Author Share Posted March 31, 2014 (edited) just test it and I got a failurehere is the information I put in a new script added to a new quest made to start my quest. Quest Property MQ101 Auto Quest Property 001Curioussense Auto Event OnInit() If QuestCheck() == false RegisterForUpdate(60) ;calls for a 60 second real time update EndIf EndEvent Event OnUpdate() If QuestCheck() == false RegisterForUpdate(60) ;Keep repeating the update call as long as the function returns false EndIf EndEvent bool Function QuestCheck() bool result = false If MQ101.GetStage() >= 900 ;unbound itself is not quite over or could be over and the player has escaped everything and is free to do as they wish 001Curioussense.Start() result = true EndIf return result EndFunction this is the error I get. bool Function QuestCheck()bool result = falseIf MQ101.GetStage() >= 900 ;unbound itself is not quite over or could be over and the player has escaped everything and is free to do as they wish001Curioussense.Start()result = trueEndIfreturn resultEndFunction Starting 1 compile threads for 1 files...Compiling "newscript001"...C:\Games\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\newscript001.psc(5,15): no viable alternative at input '001'C:\Games\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\newscript001.psc(5,35): mismatched input '\\r\\n' expecting STATEC:\Games\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\newscript001.psc(26,3): required (...)+ loop did not match anything at input 'Curioussense'No output generated for newscript001, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on newscript001 *edit I think I fixed it. Turns out I forgot about setting the property ;) Edited March 31, 2014 by FalloutZaxus Link to comment Share on other sites More sharing options...
IsharaMeradin Posted March 31, 2014 Share Posted March 31, 2014 Setting the property would not solve the posted compiler error. That error is directly related to the property variable name that starts with a number.I, too, have had issues with variable names that started with a number. Numbers trailing a variable name have not had issues. Example: 001Something <== has given me issuesSomething001 <== has not given me issues Also note, property names do not need to match the names of the objects or other records that will fill the property. That is only a feature that allows you to use the auto-fill button. If you know what needs to be there you can use a variable name that makes readable sense. Link to comment Share on other sites More sharing options...
Kurzusseus Posted April 1, 2014 Author Share Posted April 1, 2014 (edited) K thanks for all your help. I got the script compiled successfully now without problems.I noticed like you said about the problem starting with 001. I switched it aroundand everything worked in the end. This Question has been successfully ANSWERED: I like putting that so others can see in bright color that they need not post anymore if you know what I mean. :laugh: Edited April 1, 2014 by FalloutZaxus Link to comment Share on other sites More sharing options...
rmm200 Posted April 11, 2015 Share Posted April 11, 2015 (edited) Added in error Edited April 11, 2015 by rmm200 Link to comment Share on other sites More sharing options...
Recommended Posts