help with Spell on weapon attack

Post » Tue Jun 19, 2012 7:48 pm

basically what I want to do is have a weapon attack cast a spell. In my case return mana ( yeah i know i could just make a enchant but thats not what i want).

First i tried going the route of making a weapon buff spell but it wont work because it checks if weapon is enchanted etc like the shout.....

Next I tried putting it overwriting the "attack data" on the player list by adding a spell to each power attack....... I had this working then after unloading and reloading mod without changing anything it stopped working and i cant get it to work again even after trying again from scratch.

Then i tried make the spell using scipts.............I based all my hopes on the "onhit" event...... only to find out it meant on getting hit not on hitting something....

There has to be a simple solution to this or something i'm missing, If someone please saves me from hours of pain i'd be grateful :smile::)





EDIT: just tested adding spell to power attack again it worked for 10 mins then stopped.... wouldn't work again till i backup to earlier save....... seems buggy not sure what the problem is. was fresh esp just adding spell to attack....
User avatar
Christine
 
Posts: 3442
Joined: Thu Dec 14, 2006 12:52 am

Post » Wed Jun 20, 2012 10:03 am

Create a new magic effect. Create a new ability. Add the magic effect to the ability. For the conditions, use "IsAttacking == 1" and "GetEquipped : your weapon == 1". Make that magic effect recover your magicka somehow.
User avatar
Kevan Olson
 
Posts: 3402
Joined: Tue Oct 16, 2007 1:09 am

Post » Wed Jun 20, 2012 5:00 am

ahhh thanks i overlooked the isattacking condition that will be very helpful. I figured out what I was doing wrong with a lot of spells that seamed not to work, it needed a duration .......put 1s duration to spell and it works even though it seems like it wouldn't need it.... not doing that caused me to write off a lot of things as doesn't work. oh wells
User avatar
Shelby Huffman
 
Posts: 3454
Joined: Wed Aug 08, 2007 11:06 am


Return to V - Skyrim