ModActorValue from ActiveMagicEffects

Post » Wed Jun 20, 2012 9:24 pm

Ok I am working on a script for my ActiveMagicEffects that is supposed to increase the health of the summoned mob by a certain ammount if the player has certain perks. Currently Everything with the script is working except for moddingthe health of my summoned mob. I get all of my Debug messages including the one saying "The Summon Has been buffed!" But the summon still has normal health and no buff has been added. Ive tried playing around with different syntax's and different ways to do the ModAV or ModActorValue but almost any other way I try gives me compile errors. Ive tried looking for example scripts of how its been done in other cases but I'm not having any luck. Anyways I'd greatly appreciate it if someone can point me in the right direction!

Scriptname PsiSummonScript extends activemagiceffect  PsiNecromancyQuestScript Property PsiNecroQuest Autofloat Checkonce1Event OnEffectStart(Actor Target, Actor Caster)	if Checkonce1 == 0		Game.GetPlayer().ModActorValue("Magicka", - PsiNecroQuest.PsiUpkeepcharge)		Checkonce1 = 1.0			Debug.Messagebox("Player Charged Magicka Upkeep!")		if PsiNecroQuest.PsiHasHastenDead == 1			Target.ModAV("Health", PsiNecroQuest.PsiHastenDeadHealthBonus)				Debug.Messagebox("The Summon Has been buffed!")		Endif	EndifEndEventEvent OnEffectFinish(Actor Target, Actor Caster)	Game.GetPlayer().ModActorValue("Magicka", PsiNecroQuest.PsiUpkeepcharge)	Checkonce1 = 0		   Debug.Messagebox("Player No longer Charged Magicka Upkeep!")		if PsiNecroQuest.PsiHasHastenDead == 1			Target.ModAV("Health", - PsiNecroQuest.PsiHastenDeadHealthBonus)		EndifEndEvent

Obviously I can accomplish the same thing by declaring conditions for the spell and creating different mobs to be summoned depending on player perks but then I'd have to create a ton of different mobs depending on player perk combinations and that would just svck
User avatar
Baylea Isaacs
 
Posts: 3436
Joined: Mon Dec 25, 2006 11:58 am

Return to V - Skyrim