Jump to content

How to accually do this? :S


Sirxon

Recommended Posts

What im trying to do is perk accually ( i have it already and its working on this "prototype" version), basically its unarmed perk for werewolves that is depended on target's health, more hits more damage.

 

But i want to make it like a single ability with the script through the Magic Effect; it is very simmilar to the Deadly Dragon's Armory weapon Magebane which burn's target's magicka and adds damage for the same ammount the magicka was burned, i want to make it like health depended, so i wonder how the script should look like exactly and few advice's how to set up Magic Effect for it, prolly would be (if im right)

 

Fire and forget, contact, destruction , MagicEffect as Script effect, now the other is either DamageResist or MagicResist, Detrimetral, Hostile, No area, HideInUI...

 

Any suggestion's please and scripts? :S

 

This is Magebane script that 3jiou provided for me:

 

Scriptname DDAMageBaneScript extends activemagiceffect  

import debug

actor target
float magRaw

Event OnEffectStart(Actor akTarget, Actor akCaster)
target = akTarget
magRaw = target.getbaseAV("Magicka") * 0.05
If magRaw >= target.getAV("Magicka")
	notification(magRaw as int + " damage")
	target.damageAV("Magicka", magRaw)
	target.damageAV("Health", magRaw)
Else
	magRaw = target.getAV("Magicka") * 0.1
	notification(magRaw as int + " damage")
	target.damageAV("Magicka", magRaw)
	target.damageAV("Health", magRaw)
Endif
Endevent

 

So im wondering if this script is good for what im trying to do or should it be totally different? :S I sux in Papyrus (basic knowledge) so im asking for a help.

Link to comment
Share on other sites

Not sure what you mean by "health dependent" ... you want this magebane effect to occur only if the target has >= a certain health percentage? Or that the damage to health and magicka are handled as a percentage of the target's health?
Link to comment
Share on other sites

More like less and equal to the percentage of the health lost to the damage.

 

I guess I'm not understanding exactly what you are trying to do here. If you're trying to bind something to health percentage, you can try using GetAVPercentage().

Link to comment
Share on other sites

Here is the last try....

Your damage grows as you damage the enemy meaning = less health more damage...

 

You can try applying the amount of damage you want increased against a check to akTarget.GetAVPercentage("heath"). E.g., something to the effect of:

 

Float targetHealth = akTarget.GetAVPercentage("Health")
damageTarget = ((1 - targetHealth) * 10) as Int
akTarget.DamageAV("Health", damageTarget)

 

Here, as the target's health drops, the damageTarget number increases. Because targetHealth returns as a value between 0 and 1, my example has "damageTarget" ending up between 1 and 10, with 10 damage applied when the target is close to having 0% health. You can change the multiplier of course to whatever you wish.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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