pepperman35 Posted April 11, 2021 Share Posted April 11, 2021 Is there a way to create a book which can be read but not taken? I tried checking “Can’t be Taken” box but that seems to be ineffective. What am I missing? Link to comment Share on other sites More sharing options...
dylbill Posted April 11, 2021 Share Posted April 11, 2021 You can add a simple script to your book to prevent taking: Scriptname TM_PlayerNoTake extends ObjectReference Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) If akNewContainer == Game.GetPlayer() If akOldContainer == None Self.Drop() Else akNewContainer.RemoveItem(Self, 1, True, akOldContainer) Endif Debug.Notification("Can't take this book.") Endif EndEventNote, this will only work if your book object reference is placed in the world. If it starts inside a container, it won't have a reference and the script won't work. Link to comment Share on other sites More sharing options...
pepperman35 Posted April 11, 2021 Author Share Posted April 11, 2021 Thanks dylbill, much appreciated. I amended it slightly so that the book got placed back to its original position. Scriptname MLS_PlayerNoTake extends ObjectReference {Prevents the player from taking an item; script provided by dylbill via Nexus forums} ObjectReference Property MLS_BiblesLocation Auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) If akNewContainer == Game.GetPlayer() If akOldContainer == None Self.moveTo(MLS_BiblesLocation) Else akNewContainer.RemoveItem(Self, 1, True, akOldContainer) Endif Debug.Notification("You can't take this book.") Endif EndEvent Link to comment Share on other sites More sharing options...
dylbill Posted April 11, 2021 Share Posted April 11, 2021 No problem. If it's working that's what counts. Happy Modding :) Link to comment Share on other sites More sharing options...
Recommended Posts