Ironman5000 Posted September 10, 2013 Share Posted September 10, 2013 (edited) I am making spell tomes for a new mod much like how Skyrim works, and the best way I can think to do this is through a simple script. I applied and tested it but there is a problem - as a worldspace placement it works fine, the player activates the book and it adds the spell then disables, but when activated in the inventory (after buying or looting) it just opens as if it's being read and the script doesn't work. Can someone tell me what commands I need to add for both instances to work? I'm very much a noob with scripting and not sure exactly how to structure it, I thought maybe 'MenuMode' would be in there as an elseif but I might be wrong. This is an example of what I have Scriptname I5KSpellTomeScriptAbsorbAttribAgility1Novice Begin OnActivate Player.AddSpell StandardAbsorbAttribAgility1Novice disable End EDIT: I changed the script a bit so that it can be read while adding the spell, then disables when the player exits the menu. Still only works when the book is placed as a world object though. Scriptname I5KSpellTomeScriptAbsorbAttribAgility1Novice Begin OnActivate if isActionRef player == 1 Player.AddSpell StandardAbsorbAttribAgility1Novice endif Activate disable End EDIT 2: Ugh! I even found a good example of someone who did the same thing, I adopted it and tried it and it still won't run when used through the inventory screen: Scriptname I5KSpellTomeScriptAbsorbAttribAgility1Novice short doOnce begin onactivate if doOnce == 0 Activate playsound SPLMysticismCast player.addspell StandardAbsorbAttribAgility1Novice set doOnce to 1 endif end :wallbash: Edited September 10, 2013 by Ironman5000 Link to comment Share on other sites More sharing options...
Ironman5000 Posted September 10, 2013 Author Share Posted September 10, 2013 Nevermind I got it working thanks to an old post by LoginToDownload in this thread :sweat: Link to comment Share on other sites More sharing options...
cross1492 Posted March 3, 2014 Share Posted March 3, 2014 You need to add an OnEquip block with redundent code. Hope it helps. :) Link to comment Share on other sites More sharing options...
Recommended Posts