Books - Making Readable, but not Pickupable

MMRD Site


Free Graphic Programs


My Homepage


Basically, there are going to be a SH-T load of books in this room, but I want to make it so that the books can not be picked up only read. But for this room only. I also would prefer not to have to make a copy of every book in the game to put in there with a script attached that does this. I was hoping there is some global script that would apply to that room alone, preventing books from being taken.

- TGMP395

===================================================

The script that I use is basically the same that ManuUser proposed:

CODE

Begin cyr_BookScript

if ( OnActivate == 1 )
Activate
if [ menumode == 1 ]
return
endif
endif

End cyr_BookScript

When the book is activated, the text pops up and the player may turn pages and close it normally. If the player attempts to take it, the book closes, but it behaves as if an invisible menu is open. A right-mouse click returns everything to normal.

- cyran0

---------------------------------------------

That seems to do the same thing. But I see what you're going for. How about this:

CODE
Begin NoTake

if ( OnActivate == 1 )
if ( MenuMode == 0 )
Activate
else
MessageBox "You can't take this book."
endif
endif

End

It doesn't even mess up the menu. The "else MessageBox" part is optional of course, but it's always good to let the player know what's going on when you do something unusual.

- ManaUser
----------------------------------------------

You'd of course want to make special versions of all the books you're going to apply this script to, otherwise the script will apply to EVERY copy of that book in the game. Also, if you don't want people to use your library to go on a skill-book fest, you can make copies of the skill books that don't actually teach you a skill, but just have the same text in them.

- Lurlock

-----------------------------------------------

It just so happens that my own mod has a library, filled with "read-only" books.

Here's the exact script that I use:

CODE
Begin HF_BookScript

short DoOnce

If ( DoOnce == 0 )
Disable
set DoOnce to 1
Endif

If ( OnActivate == 1 )
Activate
Endif
End


You can probably ignore the stuff about DoOnce and disable.

Works great for me. The player can read the books just fine, but can't pick it up.

It's not a global, though. It has to be attached to each and every book (which neccessitates making copies of each and every book). If you want, you can just copy/paste the library from Sim-Manor (the mod of mine that contains the library) into you own mod and change it to your own needs. Just give me the credit . It would save you hours and hours of work.

You'll need a tool like MWEdit or Enchanted Editor to make the transfer.

- HotFusion4
--------------------------------------------

That last code that ManaUser posted works great. Thanks!

- TGMP395



[Page visit counter]
Built by ZyWeb, the best online web page builder. Click for a free trial.