Jump to content

Help with learning a Shout with a book


Recommended Posts

I've been looking all over for a script that teaches the player a shout by simply reading a book. I've found this one script from another guide that teaches how to make a custom shout. I think it was meant to be placed on a book, which would be placed inside a container. It looks something like this. I edited out certain details with Xs that I'm not 100% sure what to put there and made it supposed to teach one word, instead of all three.

WordOfPower Property XXX Auto
GlobalVariable Property XXX auto
Shout Property XXX Auto
Bool DoOnce


Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)

if !DoOnce
if akNewContainer == Game.GetPlayer()

Debug.Trace("I just got put in the player's inventory!")

Game.Getplayer().Addshout(XXX)
Game.TeachWord(XXX)
Game.UnlockWord(XXX)
XXX.SetValue(XXX.GetValue() + 1)

endIf
DoOnce = True
EndIf

endEvent

Thing is, I have very little experience with Papyrus and I have no clue what I'm really doing. This has been the biggest hurdle in creating my shout. I'd really appreciate some help with getting a script working so that I can learn my words of power through a book.

Link to comment
Share on other sites

I think you can just make your book a spell tome. Just check the Teaches Spell box, and choose your shout. This, I think will destroy the book though when you read it. If you want to use a script, you can just use the event OnRead:

 

Compile and attach this script to your book.

 

Scriptname AddShoutBookScript extends ObjectReference 

Shout Property MyShout Auto

Event OnRead() 
    Game.GetPlayer().AddShout(MyShout) 
EndEvent

Name the script something more unique. Change the name of your shout in the script to the same ID name that's in the creation kit. After attaching hit the properties button, and then auto fill all.

Link to comment
Share on other sites

I think you can just make your book a spell tome. Just check the Teaches Spell box, and choose your shout. This, I think will destroy the book though when you read it. If you want to use a script, you can just use the event OnRead:

 

Compile and attach this script to your book.

 

Scriptname AddShoutBookScript extends ObjectReference 

Shout Property MyShout Auto

Event OnRead() 
    Game.GetPlayer().AddShout(MyShout) 
EndEvent

Name the script something more unique. Change the name of your shout in the script to the same ID name that's in the creation kit. After attaching hit the properties button, and then auto fill all.

Insanely helpful, thank you so much!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...