Detecting which hand is holding weapon

Post » Mon Dec 08, 2014 3:49 pm

Long story short, I'm working on a weapon that "charges up" as you hit people with it, basically just because I thought it would be cool.

Anyway, I made a magic effect, attached a script, then in the OnEffectStart event, it simply checks the weapons that the player is holding and determines whether they have this magic effect on them. If it does, then we make the weapon stronger. The problem is, this assumes that the player only uses one weapon with this enchantment at any time. If the player has two weapons with this enchantment, one in each hand, then things get a little bit complicated.

Of course, there are a few ways to get around this, for example, I could just use different enchantments and magic effects to ensure that the player never has 2 copies of the exact same enchantment without cheating (I plan to put them on unique weapons in the first place)..

Anyway, despite me being able to solve the problem, I would still like to know whether, from a script running in a magic effect that was applied by a weapon, if there is a way to determine exactly which weapon was used to apply the effect.

User avatar
STEVI INQUE
 
Posts: 3441
Joined: Thu Nov 02, 2006 8:19 pm

Return to V - Skyrim