blackbelt Posted January 27, 2009 Share Posted January 27, 2009 I have no clue why this won't work even though its so simple. I attatched this script to a book the player picks up. Begin Onadd If (getstage "Questname") == 10 setstage "Questname" 20 endifend Yes the questname is spelt correctly I checked. But the quest just doesn't update. Even when I use Setstage "Questname" 20 from the console ingame it doesn't work. When this didn't work I tried a way around it by using Begin Onadd addtopic "Topicname" End and again this didn't work. I think it might be something with the book or the queststage. I have no clue. Link to comment Share on other sites More sharing options...
Vagrant0 Posted January 27, 2009 Share Posted January 27, 2009 I have no clue why this won't work even though its so simple. I attatched this script to a book the player picks up. Begin Onadd If (getstage "Questname") == 10 setstage "Questname" 20 endifend Yes the questname is spelt correctly I checked. But the quest just doesn't update. Even when I use Setstage "Questname" 20 from the console ingame it doesn't work. When this didn't work I tried a way around it by using Begin Onadd addtopic "Topicname" End and again this didn't work. I think it might be something with the book or the queststage. I have no clue.Don't use quotes, it's hard to determine if that is how you have it in your script, or if you are just using a sort of filler to avoid having to show your actual questid. Instead use <questname>, atleast I have found this to be a bit more of a clear indication. As for your problem, considder double checking that the script saves, and that you have attached it to the book. You may also want to remove parenthesis unless you need to group together certain conditions. You may want to specify exactly that you want it to work with the player.http://cs.elderscrolls.com/constwiki/index.php/OnAdd Also, how is the player picking up this book. As books tend to have a special system associated with them, OnAdd may not trigger when being picked up within the menumode. Instead what you might want to do is make use of both scripting on the book, and in the quest script to advance things along a different way. Begin onactivate if getstage <questname == 10 setstage <questname> 19 endif activate endon the book. In the quest, set a stage 19 without any journal entry. This is entirely so that the quest scripting, which is run in game mode, can pick up on the stage 19, and advance it to 20 if the player has the book after activating it.begin gamemode if getstage <questname> == 19 && player.getitemcount <formid of book> >= 1 setstage <questname> 20 player.addtopic <topicname> endif end Link to comment Share on other sites More sharing options...
blackbelt Posted January 27, 2009 Author Share Posted January 27, 2009 Thanks I'll try this out. Link to comment Share on other sites More sharing options...
AzirAphale001 Posted January 27, 2009 Share Posted January 27, 2009 I think it's actually 'Player.GetStage' and 'Player.SetStage'. This means that the script applies to the player, rather than the book (or something like that). Link to comment Share on other sites More sharing options...
blackbelt Posted January 30, 2009 Author Share Posted January 30, 2009 I think it's actually 'Player.GetStage' and 'Player.SetStage'. This means that the script applies to the player, rather than the book (or something like that). I don't think it makes a difference if you say player.gestage or Getstage because the player is the only one in the game who can get quests. But I'll try it. I think the problem may be with the fact that I may have incorrectly made a quest target since the problem seems to be with the queststage and it's the only one with a target. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.