Jump to content

Is their a way to make a weapon affect the user on-hit?


galgus

Recommended Posts

I've already summed up my question, but is it possible to make a weapon buff the user with things like Heal and Shield upon hit?

 

I don't need to mod it into spell making, but I would like to know how to script the effect into a custom weapon.

Link to comment
Share on other sites

If you don't mind me asking, why would you want to do such a thing? You could always just cast a shield spell on them or use a heal spell on them, why would you want to hit them with healing weapons?
Link to comment
Share on other sites

I think the point is to have the weapon heal the wielder when it does damage to the target. If it's the player, you can just use "Player" otherwise you can try a combination of GetActiveEffectCount, GetNthActiveEffectCaster, and possibly GetContainer.

 

If that doesn't work, you'd need to use Event Handlers like OnHit.

 

Or, if there's only going to be a single copy of this weapon, you could have the enchantment effect script of the weapon change a global or quest variable when it hits someone. Then the script on the sword will detect changes in the variable and add effects to whoever is carrying it.

Edited by fg109
Link to comment
Share on other sites

Dont know about shield. but a lot of crafty measures can be used to create what you want.

e.g. you want heal user on hit. try absorb health on hit.

I have a silver dagger for my mage called "Lifedrinker" with absorb health 30 on hit. good backup when i run out of magicka

Edited by AtlasS
Link to comment
Share on other sites

I think the point is to have the weapon heal the wielder when it does damage to the target. If it's the player, you can just use "Player" otherwise you can try a combination of GetActiveEffectCount, GetNthActiveEffectCaster, and possibly GetContainer.

 

If that doesn't work, you'd need to use Event Handlers like OnHit.

 

Or, if there's only going to be a single copy of this weapon, you could have the enchantment effect script of the weapon change a global or quest variable when it hits someone. Then the script on the sword will detect changes in the variable and add effects to whoever is carrying it.

 

Thanks, I'll try using the "Player" script.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...