dePog Posted May 9, 2018 Share Posted May 9, 2018 My mod (Tiefling) is set up to automatically make game saves at 3, 10, or 30 minute intervals (players choice). This works fine except if the player is in dialogue with an NPC. It will attempt to save and then give an error message that it can't save at this time. I have tried scripting the "isTalking" condition, but CK doesn't seem to recognise it. I have tried:if mySelf.isTalkingif mySelf.isTalking==1if game.getPlayer().isTalking==1 Is there any other way to check if your player is in dialogue with another NPC ? Thanks,dePog Link to comment Share on other sites More sharing options...
foamyesque Posted May 9, 2018 Share Posted May 9, 2018 (edited) It's a pain, but it can be done. The reason your approach failed is that: a. IsTalking only works on NPCs/talking activators and b. is a condition with no equivalent papyrus function, so you can't call it directly from a script (the usual workaround for accessing such things from a script involves putting it as a condition on a spell and checking for that, or potentially firing a quest with search aliases). There are some other approaches here, too: https://www.creationkit.com/index.php?title=Talk:GetDialogueTarget_-_Actor Edited May 9, 2018 by foamyesque Link to comment Share on other sites More sharing options...
dePog Posted May 9, 2018 Author Share Posted May 9, 2018 Good grief! Makes you wonder about the sanity of whoever created Papyrus, lol. Thanks foamyesque, I'll give that scripted link a try. Link to comment Share on other sites More sharing options...
RichWebster Posted May 9, 2018 Share Posted May 9, 2018 A good workaround is to just check if the player's looking controls are enabled. If they are they won't be in the dialogue choice menu. https://www.creationkit.com/index.php?title=IsLookingControlsEnabled_-_Game Link to comment Share on other sites More sharing options...
dePog Posted May 9, 2018 Author Share Posted May 9, 2018 (edited) hmmm... nice one B1gBadDaddy, thanks Edited May 9, 2018 by dePog Link to comment Share on other sites More sharing options...
Evangela Posted May 9, 2018 Share Posted May 9, 2018 (edited) Good grief! Makes you wonder about the sanity of whoever created Papyrus, lol. Thanks foamyesque, I'll give that scripted link a try.I question his sanity(Jeff Lundin) all the time, but he's also said that papyrus was not intended to be used in the way that we're using it and that he only created it for the purpose of the various puzzles you come across in the game. It only just so happens that the functions made could be taking much further the he expected. So if you feel there should have been a script function for X but there is a condition function for X, minus an important bit to go with it(IsTalking is a good example).. most likely because the team didn't have a need for it. Papyrus wasn't designed with detailed and advanced scripting in mind. Edited May 9, 2018 by Rasikko Link to comment Share on other sites More sharing options...
dePog Posted May 9, 2018 Author Share Posted May 9, 2018 (edited) Good grief! Makes you wonder about the sanity of whoever created Papyrus, lol. Thanks foamyesque, I'll give that scripted link a try.I question his sanity(Jeff Lundin) all the time, but he's also said that papyrus was not intended to be used in the way that we're using it and that he only created it for the purpose of the various puzzles you come across in the game. It only just so happens that the functions made could be taking much further the he expected. So if you feel there should have been a script function for X but there is a condition function for X, minus an important bit to go with it(IsTalking is a good example).. most likely because the team didn't have a need for it. "Papyrus wasn't designed with detailed and advanced scripting in mind." lol, yeah, I figured that. But it feels good to have a whinge now and then :smile: Edited May 9, 2018 by dePog Link to comment Share on other sites More sharing options...
foamyesque Posted May 9, 2018 Share Posted May 9, 2018 Good grief! Makes you wonder about the sanity of whoever created Papyrus, lol. Thanks foamyesque, I'll give that scripted link a try.I question his sanity(Jeff Lundin) all the time, but he's also said that papyrus was not intended to be used in the way that we're using it and that he only created it for the purpose of the various puzzles you come across in the game. It only just so happens that the functions made could be taking much further the he expected. So if you feel there should have been a script function for X but there is a condition function for X, minus an important bit to go with it(IsTalking is a good example).. most likely because the team didn't have a need for it. Papyrus wasn't designed with detailed and advanced scripting in mind. My favourite bit is that it shipped without arrays, so if you look at, say, the script for some of the major quests, you get property declarations for days. Hundreds of lines of duplicated code because you couldn't just make a list. Link to comment Share on other sites More sharing options...
Evangela Posted May 9, 2018 Share Posted May 9, 2018 Oh yes, yes. The CW scripts immediately come to mind. There was some funny script comments about that from the person coding one of the CW scripts. Unfortunately for him, arrays were implemented long after he finished those scripts. Link to comment Share on other sites More sharing options...
FaegenFeorhlif Posted May 14, 2018 Share Posted May 14, 2018 A good workaround is to just check if the player's looking controls are enabled. If they are they won't be in the dialogue choice menu. https://www.creationkit.com/index.php?title=IsLookingControlsEnabled_-_GameThis is a nice workaround! Another more direct approach would be to use the SKSE function IsMenuOpen("Dialogue Menu") https://www.creationkit.com/index.php?title=IsMenuOpen_-_UIIf that string "Dialogue Menu" doesn't work, there's tonnes of others on that page to listen for. Link to comment Share on other sites More sharing options...
Recommended Posts