I didn't see any vanilla code in the script that stops enemies draining life from you or from receiving the health bonus while under force field, but it could be in another script.I checked the source script and the correct object was not being passed to the modded code (the caster object was passed twice in vanilla script for some reason instead of caster and target objects), the index of the object to check was invalid (indexing starts at 0 so even if the target object had been passed correctly using the second index (1), the script listed index 2 when checking for force field effect), and even if those parts had been right the fix allows for the life to be drained from the target just not gained by the caster (unless the drain is stopped in another script).A better place to put the changes if you want to make the spell ineffective on any target with the force field effect is in the event pending section, and it can easily be implemented using event manager for compatibility with other mods.I rewrote the scripts for both drain life and drain mana (they are very similar) to not allow either spell to be cast on any target under the effect of force field. I was still able to drain and receive life from enemy targets under the effect of force field. Great idea, poor execution - fix did not work for me.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |