The Elder Scrolls Forums

TES Construction Set and Plugins >> General TES Construction Set

Pages: 1
Monica21
Master

Reged: 01/16/03
Posts: 6109
Loc: D'Hara
Disable the Take function?
      #2958102 - 08/22/04 01:21 PM

Is there a way to disable the Take function for books? I have in-game books that need to have scripts attached, so they are unique but I also need them to be unable to be put in inventory or else they won't be recognized by another script.

--------------------
ElricM Web Portal
Telesphoros' List 'o Mods
kwshipman's List of House Mods

Post Extras: Print Post   Remind Me!   Notify Moderator  
Grumpy
Disciple

Reged: 08/02/02
Posts: 1590
Re: Disable the Take function? [Re: Monica21]
      #2958252 - 08/22/04 02:24 PM

if ( Player->GetItemCount book == 1 )
RemoveItem book 1
Position book x y z zrot
endif

I don't think there's a way to disable the "take" option, so you'ld have to use a script something like the above. Unfortunately, this cannot be on the book itself, but will need to be on a hidden activator someplace in the vicinity. If you try putting it on the book itself, the game will crash when the "removeitem" function runs. The "Position" function replaces the book...

There is another function called "SetAtStart", but I've never seen it used before (at least like this). Theoretically, you could do something like this:

if ( Player->GetItemCount book == 1 )
book->SetAtStart
endif

Something else you could try:

if ( Player->GetItemCount book == 1 )
Drop book 1
endif

If any of these do work, I doubt they will satisfy your conditions. For instance, using the first one, I'm not sure the player would be able to read the book.

Maybe this will give somebody else some ideas though...

--------------------
Grumpy
My mods

Post Extras: Print Post   Remind Me!   Notify Moderator  
JOG
Curate

Reged: 09/15/02
Posts: 745
Re: Disable the Take function? [Re: Grumpy]
      #2958323 - 08/22/04 02:43 PM

Actually it's quite simple to disable the take function

Code:
begin book_no_take


if ( Onactivate == 1 )
Activate
endif

end



This will open the book again (with removed Take Button) when you click on "Take".

If you need a OnActivate-Script (e.g journal Entry) but want the player to be able to take the book you need to test on (Menumode == 0) before Activating...



--------------------
Havish (Updated to v1.2 !!!)

Pirates! (WIP)

My Morrowind Corner

Post Extras: Print Post   Remind Me!   Notify Moderator  
Monica21
Master

Reged: 01/16/03
Posts: 6109
Loc: D'Hara
Re: Disable the Take function? [Re: JOG]
      #2958463 - 08/22/04 03:23 PM

Thanks, Grumpy and JOG.

Stupid question time. I currently have the following script attached to keep the books disabled until another script enables them:

Code:
Begin _MMBookDisable

short doOnce
;
if ( doOnce == 0 )
Disable
Set doOnce to 1
endif

end _MMBookDisable



How would I use both the disable function and no-take function in the same script?

--------------------
ElricM Web Portal
Telesphoros' List 'o Mods
kwshipman's List of House Mods

Post Extras: Print Post   Remind Me!   Notify Moderator  
JOG
Curate

Reged: 09/15/02
Posts: 745
Re: Disable the Take function? [Re: Monica21]
      #2958798 - 08/22/04 05:08 PM

Just merge the scripts:

Code:
Begin _MMBookDisable

short doOnce

if ( Onactivate == 1 )
Activate
endif

if ( doOnce == 0 )
Disable
Set doOnce to 1
endif

end _MMBookDisable




--------------------
Havish (Updated to v1.2 !!!)

Pirates! (WIP)

My Morrowind Corner

Post Extras: Print Post   Remind Me!   Notify Moderator  
Monica21
Master

Reged: 01/16/03
Posts: 6109
Loc: D'Hara
Re: Disable the Take function? [Re: JOG]
      #2958803 - 08/22/04 05:09 PM

I was hoping it would be that easy, but when it comes to scripting I don't like to assume.

Thanks!

--------------------
ElricM Web Portal
Telesphoros' List 'o Mods
kwshipman's List of House Mods

Post Extras: Print Post   Remind Me!   Notify Moderator  
Archived User Account

Re: Disable the Take function? [Re: Monica21]
      #2959930 - 08/22/04 09:57 PM

Begin _MMBookDisable

short doOnce

if ( Onactivate == 1 )
Activate
endif

if ( doOnce == 0 )
Disable
Set doOnce to 1
endif

end _MMBookDisable



Hmm.... if I read this correctly, the book immediately disables itself when the cell is loaded since doOnce is initialized as zero.



Post Extras: Print Post   Remind Me!   Notify Moderator  
ManaUser
Master

Reged: 05/31/00
Posts: 6115
Loc: Long Beach, CA, USA
Re: Disable the Take function? [Re: ]
      #2959970 - 08/22/04 10:10 PM

Probably that's what she wants, and it get's enabled leter by another script.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1


Extra information
0 registered and 2 anonymous users are browsing this forum.

Moderator:  Umrahel, Freddo, Pete, Hungry Donner, Attrebus, Miltiades, tegger 

Print Thread

Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 105

Rate this thread
 
Jump to

The Elder Scrolls Homepage

*
UBB.threads™ 6.3

Click for Privacy Statement 2003 Bethesda Softworks LLC, a ZeniMax Media company. All Rights Reserved.
PRIVACY POLICY | TERMS & CONDITIONS | LEGAL INFORMATION | CONTACT US