Deleted3576383User Posted February 20, 2012 Share Posted February 20, 2012 I attach this to a book, one time through the reference in the render window and the other time on the object itself. Nothing happens when I open the book. I've put different commands in there to test it (give gold etc) but nothing happens. It compiles successfully. Why is this? Scriptname tinyangrytrollsscript2 extends ObjectReference Book property Book0ArtOfTrolling auto Spell property SpellSummonMiniTrolls auto Event OnRead() if Game.GetPlayer().HasSpell(SpellSummonMiniTrolls) == false Game.GetPlayer().AddSpell(SpellSummonMiniTrolls) endif EndEvent Link to comment Share on other sites More sharing options...
Keldis Posted February 20, 2012 Share Posted February 20, 2012 Why do you want to make it that complicated? Why not just add the spell to a book like spelltomes? Link to comment Share on other sites More sharing options...
Deleted3576383User Posted February 20, 2012 Author Share Posted February 20, 2012 If I get the book to teach skill like a spell tome, the book disappears when you use it. I want the player to be able to keep and read it. Link to comment Share on other sites More sharing options...
Sunnie Posted February 20, 2012 Share Posted February 20, 2012 Thats over complicating things, really. Just make a book that has your story, then make a spell tome for it, place them both in the same spot and you're done, no scripts needed. Link to comment Share on other sites More sharing options...
Deleted3576383User Posted February 20, 2012 Author Share Posted February 20, 2012 I see what you mean but I thought a one-event script was simple enough. It might help to know in the future for setting quest stages and there was another user around looking to find out how to do this as well. Link to comment Share on other sites More sharing options...
duggelz Posted February 20, 2012 Share Posted February 20, 2012 Maybe try extending Book, not ObjectReference, and attaching directly to the book object? Scriptname tinyangrytrollsscript2 extends Book Link to comment Share on other sites More sharing options...
OminousVoice Posted February 21, 2012 Share Posted February 21, 2012 I had similar trouble with OnRead. Try both OnActivate and OnEquip. You'll need to create two events. One will trigger when reading from the world, the other will trigger when reading from an inventory. Link to comment Share on other sites More sharing options...
Recommended Posts