Jump to content
ℹ️ Intermittent Download History issues ×

Resquest a Racial Skill.


Dumitas

Recommended Posts

Hi!

I'm doing a new race mod, and I want to do a racial skill.
I want to "burn" all mana and stamina then heal the half of the burned amount; I don't want a mod just a small guide how to do that skill.




Thanks in advance sorry for my english :D

Edited by Dumitas
Link to comment
Share on other sites

  • 4 weeks later...

I know it's been a while since this was posted, but I'll go ahead and put my best guess in case someone's interested.

 

You'll want this script for your effect:

Scriptname AbilityBurnEffectScript extends ActiveMagicEffect

Message Property barNotFull auto
float stamina		; holds maximum stamina for removal and return
float magicka		; holds maximum magicka for removal and return
bool DEBUG_MESSAGES = true		; change to false to disable debug messages

Event OnEffectStart(Actor akCaster, Actor akTarget)		; Since this is a racial ability, the caster and target are the same. I will only use akCaster for the sake of clarity.
	if DEBUG_MESSAGES
		debug.notification("AbilityBurn script started.")
	endif
	
	; If stamina or magicka are not at 100%, cancel the effect.
	if (akCaster.GetAVPercentage("stamina") != 1.0)
		barNotFull.Show()
		Dispel()
	elseif (akCaster.GetAVPercentage("magicka") != 1.0)
		barNotFull.Show()
		Dispel()
	endif
	
	; Remove all stamina and magicka
	stamina = akCaster.GetAV("stamina")
	magicka = akCaster.GetAV("magicka")
	akCaster.DamageAV("stamina", stamina)
	akCaster.DamageAV("magicka", magicka)
	
	if DEBUG_MESSAGES
		debug.notification("Stamina and magicka burnt.")
	endif
	
	; Do whatever else needs to be done
EndEvent

Event OnEffectFinish(Actor akCaster, Actor akTarget)
	if DEBUG_MESSAGES
		debug.notification("AbilityBurn effect ending, finishing script.")
	endif
	
	; Restore half of stamina and magicka
	akCaster.RestoreAV("stamina", stamina / 2)
	akCaster.RestoreAV("magicka", magicka / 2)
EndEvent

I tried to comment it well so it's pretty self-explanatory, but if you need anything clarified just reply.

Edited by newzilla7
Link to comment
Share on other sites

  • Recently Browsing   0 members

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