Can I "stop" shaders using a Formlist of magic shade

Post » Fri Nov 16, 2012 5:03 pm

So any idea what I may be doing wrong?

FrostFX.Stop(me) and FireFX.Stop(me) works but when I try to use a formlist instead:

aadpFireFrostEffects.stop(me)

This will not compile.

Do I need to extract each shader effect from the form list such as in a loop?

Scriptname aadpElem extends ActiveMagicEffectFormList Property aadpFireFrostEffects  AutoEffectShader Property FireFX  AutoEffectShader Property FrostFX  Autoactor MEEvent OnEffectStart(Actor akTarget, Actor akCaster)ME = akTargetFrostFX.Stop(me)FireFX.Stop(me);aadpFireFrostShockEffects.stop(me) ;---- this will not compileendevent
User avatar
Veronica Martinez
 
Posts: 3498
Joined: Tue Jun 20, 2006 9:43 am

Post » Fri Nov 16, 2012 2:31 pm

You'd need to grab a member of the FLST, so Stop will work.
FormList Property EffectShaderFLST AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)	Int iIndex = EffectShaderFLST.GetSize()	While iIndex > 0		iIndex -= 1		(EffectShaderFLST.GetAt(iIndex) As EffectShader).Stop(akTarget)	EndWhileEndEvent
...or...
EffectShader[] Property ShaderArray AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)	Int iIndex = ShaderArray.Length	While iIndex > 0		iIndex -= 1		ShaderArray[iIndex].Stop(akTarget)	EndWhileEndEvent
...would work. I'd go with the FLST since it's already made and you can use it elsweyr.
User avatar
Amber Hubbard
 
Posts: 3537
Joined: Tue Dec 05, 2006 6:59 pm

Post » Fri Nov 16, 2012 11:02 am

Thanks, sorry now that I think about it I think I asked this same kind of question before. Some where along the line I got the impression you could just plug a formlist in easy as pie replace the object ref part of functions. When I thought that was the case I suddenly fell in love with Form lists.

But now I see that that is NEVER the case right? I am ALWAYS going to have to extract (in one way or another) my wanted form from the form list...correct?


You'd need to grab a member of the FLST, so Stop will work.
FormList Property EffectShaderFLST AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)	Int iIndex = EffectShaderFLST.GetSize()	While iIndex > 0		iIndex -= 1		(EffectShaderFLST.GetAt(iIndex) As EffectShader).Stop(akTarget)	EndWhileEndEvent
...or...
EffectShader[] Property ShaderArray AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)	Int iIndex = ShaderArray.Length	While iIndex > 0		iIndex -= 1		ShaderArray[iIndex].Stop(akTarget)	EndWhileEndEvent
...would work. I'd go with the FLST since it's already made and you can use it elsweyr.
User avatar
NAtIVe GOddess
 
Posts: 3348
Joined: Tue Aug 15, 2006 6:46 am

Post » Fri Nov 16, 2012 10:55 am

One other questions, I am using a spell to raise the fire resist actor value to 100. I even test this in the console:

Getav fire resist

This gives me 100 for the player.

However the player is still taking fire damage. Same thing with frost resist.

Any idea why? I was thinking that maybe it was some weakness to fire spell cast on the player but I checked for that and found nothing.
User avatar
Tyrone Haywood
 
Posts: 3472
Joined: Sun Apr 29, 2007 7:10 am

Post » Fri Nov 16, 2012 10:30 am

Somewhere along the line I got the impression you could just plug a formlist in easy as pie replace the object ref part of functions. When I thought that was the case I suddenly fell in love with Form lists.

But now I see that that is NEVER the case right? I am ALWAYS going to have to extract (in one way or another) my wanted form from the form list...correct?
Depends on the context. While these will work...
Int iCount = PlayerREF.GetItemCount(YourFLST)
PlayerREF.RemoveItem(YourFLST, PlayerREF.GetItemCount(YourFLST))
(YourFLST.GetAt(1) As EffectShader).Stop(akTarget)
...the below will not...
YourFLST.Stop(akTarget)
(YourFLST As EffectShader).Stop(akTarget)
User avatar
Vera Maslar
 
Posts: 3468
Joined: Wed Sep 27, 2006 2:32 pm

Post » Fri Nov 16, 2012 7:52 pm

One other questions, I am using a spell to raise the fire resist actor value to 100. I even test this in the console:

Getav fire resist

This gives me 100 for the player.

However the player is still taking fire damage. Same thing with frost resist.

Any idea why? I was thinking that maybe it was some weakness to fire spell cast on the player but I checked for that and found nothing.

Resistances cap at 85% for Magic, 80% for Physical. You need a perk that will Mod Incoming Spell Magnitude on Spells with the condition EPMagic_HasKeyword "MagicDamageFire" to 0.
User avatar
SamanthaLove
 
Posts: 3565
Joined: Mon Dec 11, 2006 3:54 am


Return to V - Skyrim