Oh, and going through an interior door fixed it.
Now that's something I may be able work off of, thanks.
 
												 
												

 
												



 
												
pcref->xRemoveSpell lastid

pcref->xRemoveSpell lastid
 ( And probably create more bugs in the process.
 ( And probably create more bugs in the process.  )
 )												
 But I'm still going to fix it for the learning experience.
 But I'm still going to fix it for the learning experience.  
												
set lastid to nightidset NightDarkness to LIN_NightDarknesssetx nightid to xStringBuild "LIN_DWN_%d" NightDarknessto that:
set prevNightDark to NightDarknessset NightDarkness to LIN_NightDarknesssetx nightid to xStringBuild "LIN_DWN_%d" NightDarknesssetx lastid to xStringBuild "LIN_DWN_%d" prevNightDarkwould solve this problem.
long templong lastidlong thisid...setx temp to xStringBuild "LIN_DWN_%%d"...setx thisid to xStringBuild temp NightDarknesssetx lastid to xStringBuild temp prevNightDark...setx thisid to xStringBuild temp HalfDarknesssetx lastid to xStringBuild temp prevHalfDark... setx thisid to xStringBuild temp StormDarknesssetx lastid to xStringBuild temp prevStormDarkNote that second '%' in first xStringBuild is required to get it to work properly, and you changed 'nightid', 'halfid', and 'stormid' at xAddSpell and xRemoveSpell to 'thisid'.

 
												
 
												



set prevNightDark to NightDarknessset NightDarkness to LIN_NightDarkness, etc. (a line before 'set NightDarkness' is missing) for each of mentioned variables. Currently they have always got value of 0, so the darkness spells will be stacking.
long stormidlong nightidlong halfid
 
												
 
												
 ) This time let's hope it works correctly!
 ) This time let's hope it works correctly! 

 ) This time let's hope it works correctly!
 ) This time let's hope it works correctly! 

 Once those new shaders come in from peachy, I'll be able to add some of those suggestions you made in your earlier posts.
 Once those new shaders come in from peachy, I'll be able to add some of those suggestions you made in your earlier posts.  
												


 So on the little bit of free-time I have I'll be able to work on this and other projects, but study > fun.
 So on the little bit of free-time I have I'll be able to work on this and other projects, but study > fun.  
												
 
												
 And I wish you good luck on those finals!  :deal:
 And I wish you good luck on those finals!  :deal:												

