Problem with attack speed and dual wielding

Post » Tue Dec 25, 2012 8:12 am

So, I've been trying to make this work for days with no avail, I hope someone could help. I need to slow down the actors attack speed unless they meet the necessary skill requirements for a specific weapon material: iron needs 10 onehanded/twohanded, steel needs 20 and so on. I made a dual effect ability with a 0.25 detrimental effect to both weaponspeedmult and leftweaponspeedmult and attached the spell to the entire race. It works beautifully with two handed weapons for both the player and NPC but I have a problem with dual wielding, if the actor has two weapons equipped with two different materials the ability is applied twice, hence slowing down the attack by 0.50.

I tried everything at my disposal, spell conditions, effect conditions, flag variables, checking for the current weapon speed, nothing works. I thought I could just dispel the effect if it has already been applied but since it's an ability with a constant effect, once it's dispelled it never works again.

Btw, this is in the effect, to inform the player he doesn't meet the requirements yet:

Spoiler

Scriptname M_ReducedWeaponSpeed extends activemagiceffect  conditionalMessage Property M_ReducedWeaponSpeedMSG autoMessage Property M_ReducedWeaponSpeedFinishMSG autoActor Property PlayerREF AutoEvent OnEffectStart(actor akTarget, actor akCaster)	if akTarget == PlayerREF		M_ReducedWeaponSpeedMSG.Show()	endifEndEventEvent OnEffectFinish(actor akTarget, actor akCaster)	if akTarget == PlayerREF		M_ReducedWeaponSpeedFinishMSG.Show()	endifEndEvent

Does anyone have any ideas?
User avatar
Haley Cooper
 
Posts: 3490
Joined: Wed Jun 14, 2006 11:30 am

Return to V - Skyrim