Jump to content

[LE] Constant enchantment and percentage heal - I may require help...


DMan1629

Recommended Posts

Hi all! :D

I'm quite new to the modding community and I have been studying by trying to make my own mod.
I have run into a problem which I just cannot seem to overcome...
I am trying to create 2 different constant effect armor enchantments:

1) An enchantment which gives the player a sort of a soul trap cloak but without requiring to cast a spell or apply the enchantment on the weapon.

I have already tried creating a magic effect (both archetype cloak and soul trap) that adds a perk which activates a fire&forget soul trap spell.
As you can already figure out - it failed.....


2) An "on-kill" enchantment to restore a percentage of a player's attribute. I made a magic effect with script archetype with the following script:

Scriptname RestoreattributePercentScript extends ActiveMagicEffect

Float Property percentage Auto
String Property attribute Auto

Event OnEffectFinish(Actor akTarget, Actor akCaster)
	Float value = ((akTarget.GetActorValue(attribute) / akTarget.GetActorValuePercentage(attribute)) * (percentage / 100) )
	akTarget.RestoreActorValue(attribute, value)
EndEvent

Where the percentage property is by how much the attribute is restored (0-100) and the attribute property is the type of the attribute (Health/Magicka/Stamina).
Again, this one failed as well...


I would be glad if anyone could help, even just point me in the general direction of the solution!

Thanks a lot to anyone who helps!!!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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