Difference between revisions of "Talk:GetMagnitude - ActiveMagicEffect"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Terra Nova2
imported>Egocarib
 
Line 31: Line 31:


And the compiler complained about the function not existing, so that's why I had to go with self. I was a bit confused by the Active '''Magic Effect''' part.--[[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2014-10-12T14:46:35 (EDT)
And the compiler complained about the function not existing, so that's why I had to go with self. I was a bit confused by the Active '''Magic Effect''' part.--[[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2014-10-12T14:46:35 (EDT)
:Yeah, that whole Magic Effect vs. Active Magic Effect thing is quite confusing :)  [[User:Egocarib|egocarib]] ([[User talk:Egocarib|talk]]) 2014-10-12T16:29:01 (EDT)

Latest revision as of 15:29, 12 October 2014

I was unable to get this to compile when pointing it to a MagicEffect type. Same deal with GetDuration. --Terra Nova2 (talk) 2014-10-12T11:37:11 (EDT)


You have to use it on an ActiveMagicEffect type (which is actually a different type than MagicEffect). I've tested this and it compiles for me using SKSE 1.7.1. For instance you can try:

ActiveMagicEffect testEffect = NONE
float testMag = testEffect.GetMagnitude()

and that should compile if you have the current SKSE source files. egocarib (talk) 2014-10-12T13:39:28 (EDT)

I also just tested the code you pasted on the main page here for GetMagnitude, it compiles fine for me in this script (attached to a MagicEffect in the CK)
scriptname testAME extends ActiveMagicEffect

Event OnEffectStart(Actor target, Actor caster)
Float Magnitude = self.GetMagnitude()
Debug.Trace("This magic effect has a strength value of" +Magnitude)
EndEvent

egocarib (talk) 2014-10-12T13:45:52 (EDT)

Well, I had tried something like

MagicEffect property myEffect auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
Float Magnitude = myEffect.GetMagnitude()
Debug.Trace("This magic effect has a strength value of" +Magnitude)
EndEvent

And the compiler complained about the function not existing, so that's why I had to go with self. I was a bit confused by the Active Magic Effect part.--Terra Nova2 (talk) 2014-10-12T14:46:35 (EDT)

Yeah, that whole Magic Effect vs. Active Magic Effect thing is quite confusing :) egocarib (talk) 2014-10-12T16:29:01 (EDT)