PrincessNiya Posted January 9, 2022 Share Posted January 9, 2022 Hello, I'm working on a mod to expand follower interactions and awareness. The follower will say lines from their 'Idle' category based on the player's current actions. So far I've been able to do this with crafting, cooking, swimming, and a few other actions with no problem. My issue is I'd like my follower to comment when the player reads a book, similar to how they do in Fallout 4. Under 'Idle' dialogue, I've tried conditioning with 'GetIsUsedItem == Book' and 'GetIsUsedItemType == Book' but neither will trigger the lines. If there isn't a way to do this, I'd also be willing to use the Story Event: Add to Player, for whenever you pick up a book, but I'm not sure how to condition the event and find the story events pretty intimidating. Does anyone have any advice? Link to comment Share on other sites More sharing options...
Sphered Posted January 9, 2022 Share Posted January 9, 2022 Suppose you could RegisterForControl("Activate") and then on ControlDown do ref check and then a GetType() check on the baseobject of that ref. Book is 27 I assume you would prefer to avoid attaching a script to hundreds of books one-by-one btw.... ObjectReference Focus = Game.GetCurrentCrosshairRef()If Focus as Bool && Focus.GetBaseObject().GetType() == 27 DoWhatever()EndIf DoWhatever() Could be to simply set a GlobalVariable or other tag for a moment, that in turn will green light a condition for making an appropriate comment. Aside there might be a built-in dialogue condition too but dont recall for sure. But above would work theoretically... If you read a book from your inventory CrosshairRef() may not work. Hmmm I think theres a way to detect what you clicked in your inventory but dont remember the details there atm... Link to comment Share on other sites More sharing options...
agerweb Posted January 10, 2022 Share Posted January 10, 2022 When I want to trigger events (conversations, idle comments, quests etc) based on the reading of books I set a global variable in an onread script attached to the books. Then use that in the conditions for events I want to trigger. I have used this on several journals, notes and books in my mods and it seems to work fine. Link to comment Share on other sites More sharing options...
PrincessNiya Posted January 11, 2022 Author Share Posted January 11, 2022 Thank you both for your suggestions. Agerweb, I think I'm going to try as you've suggested. I've looked at how the base game does the black books by calling a scene from the 'on read' where the character speaks their lines, which is interesting. How would I go about triggering the scene from the script? I'm still pretty new to papyrus. Link to comment Share on other sites More sharing options...
Recommended Posts