Abramul Posted January 19, 2008 Share Posted January 19, 2008 I'm making a mod that will allow the player to add and remove spells covering al effects they've learned, even if they've since removed any spells with those effects from their spellbook. The question I have is this: I'm planning on having the trigger be a book. Would it cause problems if the variables are stored in the script attached to the book? Two other questions:Is there a better way than spamming GetSpell to check if the player has an effect available?Is adding or removing a large number of spells in one go a bad idea? Link to comment Share on other sites More sharing options...
NewtC Posted January 19, 2008 Share Posted January 19, 2008 Storing variables in an item is okay as long as the item is unique. It will cause problems otherwise. It is probably not a good idea to remove a large amount of spells in one script. I have never actually tried using spells in morrowind scripts. There is also a scrip effect that removes all spells that have a certain effect. It's called RemoveEffects. To use it, you have to know the spell effects ID. When you know this, you just have to say something like: begin removeshieldeffect if ( onactivate == 1 )~removeeffect, sEffectShieldendif end removeshieldeffect This would remove all spells with the Shield effect from the character when activated. Link to comment Share on other sites More sharing options...
Abramul Posted January 20, 2008 Author Share Posted January 20, 2008 RemoveEffects "Removes all spells currently affecting the calling actor that include the given effect". Don't see how that's useful to me. Anyway, thanks for the help regarding local variables. I have a prototype (covers Mark, Recall, and the Interventions) of this mod ready, now to see in what way it's broken. EDIT 1: The Morrowind script editor is too forgiving! Allowing syntax that the game can't handle is downright mean. Link to comment Share on other sites More sharing options...
NewtC Posted January 21, 2008 Share Posted January 21, 2008 Sorry, some words got flipped around when I was reading. However, if there were any of those effects on the actor at the activation, it could still remove a large number of spells. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.