Mavorus Posted April 25, 2015 Share Posted April 25, 2015 I'm looking at a script that fixes the bug with the sovengarde glow effect presisting. Scriptname FXSovengardeSCRIPT extends ActiveMagicEffect {Puts the fx on the heavenly people of sovengarde} VisualEffect Property FXSovengardeGlowEffect Auto EffectShader Property SovengardeFXS Auto Actor selfRef ObjectReference myGlow EVENT OnEffectStart(Actor Target, Actor Caster) selfRef = caster ;float myScale = selfRef.getScale() ; ;debug.trace("my scale is" + myScale) myGlow = FXSovengardeGlowEffect.play(selfRef, -1) ;myGlow.setScale(myScale) SovengardeFXS.Play(selfRef) EndEvent ; fix to remove the tenacious effect shader - steve40 EVENT OnEffectFinish(Actor Target, Actor Caster) FXSovengardeGlowEffect.Stop(selfRef) SovengardeFXS.Stop(selfRef) EndEvent If I am reading this correctly, does this script basically trigger off *every* time *any* actor has a new ActiveMagicEffect start? The author of this script basically says to plop it into the skyrim data structure as is, so the script just sits by itself. I'm trying to understand how events are handled and such right now... is this script automatically run at game start and then receives all active magic effect events? Or am I understanding how this works incorrectly? Link to comment Share on other sites More sharing options...
SeanMungo Posted April 25, 2015 Share Posted April 25, 2015 (edited) Edit: whoops i made a boo boo. Yeah, you should be reading it right. That script is telling all of the Glow's, to essentially end themselves.As for if it is map wide, i dont think so. I think it only effects anything within a certain range of where the player is.For all the areas that are currently loaded. (I could be wrong, but seems like this to me.) Edited April 25, 2015 by SeanMungo Link to comment Share on other sites More sharing options...
Mavorus Posted April 25, 2015 Author Share Posted April 25, 2015 Edit: whoops i made a boo boo. Yeah, you should be reading it right. That script is telling all of the Glow's, to essentially end themselves.As for if it is map wide, i dont think so. I think it only effects anything within a certain range of where the player is.For all the areas that are currently loaded. (I could be wrong, but seems like this to me.) Got it - so basically there is, by default, a "range filter" of sorts that prevents this script grabbing any activemagiceffect across the map. However... imagine there is a large battle with a large number of activeMagicEffects being turned on/off (triggering the onEffectStart event)... is there some way to improve this script to only pay attention to the Player? By default, are scripts loaded in without being "attached" to anything attached to the player? I'm curious about how this script actually gets loaded in.. because it is not directly called by anything in the game.. it's just loaded along with this mini-bugfix mod. The entire .esp is simply this script sitting in the scripts folder basically.. Link to comment Share on other sites More sharing options...
Arocide Posted April 25, 2015 Share Posted April 25, 2015 (edited) Scripts are attached to w/e you attach them to in the Creation Kit. They don't attach to just anything that script you are referring to is probably replacing (Loose files override BSA files) a script file in a BSA with the fixed version. Sean mentioned this already but can't hurt to say it again :tongue:, Magic Effects only run on loaded objects as soon as they are unloaded the effect is stopped (which triggers the OnEffectFinish Event in the script too) and it will start again if needed when that object is loaded again (triggering the OnEffectStart) so in a sense I guess you could say its default filter is if it is loaded or not which is dependent on where the player is in the world. Edited April 25, 2015 by Arocide Link to comment Share on other sites More sharing options...
Mavorus Posted April 25, 2015 Author Share Posted April 25, 2015 (edited) Scripts are attached to w/e you attach them to in the Creation Kit. They don't attach to just anything that script you are referring to is probably replacing (Loose files override BSA files) a script file in a BSA with the fixed version. Sean mentioned this already but can't hurt to say it again :tongue:, Magic Effects only run on loaded objects as soon as they are unloaded the effect is stopped (which triggers the OnEffectFinish Event in the script too) and it will start again if needed when that object is loaded again (triggering the OnEffectStart) so in a sense I guess you could say its default filter is if it is loaded or not which is dependent on where the player is in the world. That's the thing.. I haven't attached this script to anything in the Creation Kit. I simply copied it and pasted it into the scripts section of my esp and it seems to be working fine.... that's why I am confused about how and/or what it is actually hooking into. **EDIT: Sorry, you guys were right... it seems that the vanilla sovengarde Effect's script actually is called "FXSovengardeSCRIPT".. the name is a bit weird so I just assumed it couldn't have been written by bethesda. :pinch: Anyways, since we are overwriting that script, it seems that we are directly linking into only this effect. Everything makes sense now! Sorry guys. Edited April 26, 2015 by Mavorus Link to comment Share on other sites More sharing options...
Recommended Posts