Scripting tome help

Post » Thu Mar 03, 2011 12:25 pm

Hi

I need help scripting this tome, what happens with the script is, all is fine if you pick up the book, choose yes, and close the book. But if you choose to take the book it will not activate

I'm new and still learning

The spell script works ok



Script attached to the book
scn 000TomeScriptshort doonceshort buttonpressedint buttonbegin onActivate   Activate      if doOnce == 0      MessageBox "Would you like to learn the lost mystical tome Spell of Grief?", "Yes please", "No, maybe later"      set doonce to 1      set buttonpressed to 1   else      Message "You have already learned the lost mystical secrets of the tome"   endifendbegin GameMode   if buttonpressed == 1      set button to GetButtonPressed      if button == 1         set doonce to 0         set buttonpressed to 0         Message "Ok - Maybe you can learn later"      elseif button == 0         set buttonpressed to 0         player.AddSpell 000TomeGrief         Message "You have learned the lost mystical secrets of the tome"      endif   endifend



Spell script
scriptname 000TomeGriefBegin ScriptEffectStart  Some effect hereEndBegin ScriptEffectFinish  Message "Thief's pure ownage"End

User avatar
The Time Car
 
Posts: 3435
Joined: Sat Oct 27, 2007 7:13 pm

Post » Thu Mar 03, 2011 8:09 am

Damn, explain more in details what do you want? I reading your post and always see different ways what do you want?

As I understood you want to:
Activate script when book is picked up.
Don't activate script when book is taken.

Here's my question:
What difference between take book and pick up book?...

Or you want to book taken to your inventory after you choosing "No, maybe later"?
Try this:
Activate (if book is laying somewhere on table or ground or something)
or
RemoveMe Player (if it is in container)

there:

begin GameMode   if buttonpressed == 1      set button to GetButtonPressed      if button == 1         set doonce to 0         set buttonpressed to 0         Message "Ok - Maybe you can learn later"         Active OR RemoveMe Player <------------------------------------------      elseif button == 0         set buttonpressed to 0         player.AddSpell 000TomeGrief         Message "You have learned the lost mystical secrets of the tome"      endif   endifend

User avatar
Holli Dillon
 
Posts: 3397
Joined: Wed Jun 21, 2006 4:54 am

Post » Thu Mar 03, 2011 9:40 pm

I tried to explain it, but after re-reading it there is a bit of mind reading expected by me, sorry about that mate. I just wanted a tomb to be identical behavior to DLC Spell Tomes, these are the only spell tomes i know

That bit below you have is exactly how it behaves at the moment, and is not the same behaviour of DLC Spell Tomes

Damn, explain more in details what do you want? I reading your post and always see different ways what do you want?

As I understood you want to:
Activate script when book is picked up.
Don't activate script when book is taken.



Picking up the book and dropping it only - Part 1 (next bit below is the taking the book)
If i pick up the book, i always have the option to choose to activate the tomb, if i chose no, i drop the book(all is well), or i choose to activate the book(all is well) i drop the book.

Picking up the book and Taking it - Part 2
If i pick up the book, i always have the option to choose to activate the tomb, if i chose no, and take the book(it can't ever be activated in the inventory later <-- bad - i want to be able to activate later)
or when picking up i choose activate, then take the book, it does not activate, and cant ever be activated by this book ever again(very bad <-- not good)

Also need something to allow you to open the tome in the inventory and activate it, every thing i have tried have failed dismally, so bad i was lost in the code and wont post it
User avatar
Lily Something
 
Posts: 3327
Joined: Thu Jun 15, 2006 12:21 pm

Post » Thu Mar 03, 2011 12:54 pm

Actually i think this is better by changing GameMode to MenuMode

Now all works except when you pick up the book and choose no, and take the book. Now you go to the inventory and open the book it does nothing, when it should ask you do you want to enable the tome. But if i drop the book from there to the ground, then open it, it asks the question.

So its close, any suggestions any one, i tried changing "begin MenuMode 1" but nothing will happen then(forgot to test if it work in the inventory side or not)
User avatar
sas
 
Posts: 3435
Joined: Thu Aug 03, 2006 8:40 am


Return to IV - Oblivion