Adding Script to Spell Tome

Post » Thu Sep 19, 2013 2:50 pm

Can we add an OnRead event script to a spell tome so that when the spell tome is read it updates a quest stage or completes a quest?

Or might it interfere with the spell being added to the player's spell book menu?

Or would OnContainerChanged be better and would this work when going from on the ground to the player's inventory, rather than from an NPC inventory or a chest to the player's inventory?

Cheers!

~.~

User avatar
LittleMiss
 
Posts: 3412
Joined: Wed Nov 29, 2006 6:22 am

Post » Thu Sep 19, 2013 1:44 pm

OnContainerChanged() works whenever the object is added to a container, whether from one container to another, world to container, or container to world.

You might be best using a quest alias, fill it with the tome, and add the script to the alias. You're looking for SetStage() functions or SetObjectiveCompleted() functions.
User avatar
Motionsharp
 
Posts: 3437
Joined: Sun Aug 06, 2006 1:33 am


Return to V - Skyrim