Welcome to the AFK Mods bug tracker. In order to report an issue, you need to have a VALIDATED account to post one. Once you have followed the link the registration email sent you, please select a project from the drop down menu below. Select “Open New Issue” and fill out the form with as many details as possible.

Please also consider sending your bug report to Bethesda if you are reporting on an issue with Skyrim Special Edition, Fallout 4, Starfield, or Oblivion Remastered. Doing so will help everyone on all platforms.

Issue Data
Status: New
Issue Type: Bug Report
Project: Unofficial Skyrim Special Edition Patch
Component: Skyrim SE: Vanilla
Category: Papyrus
Assigned To: Garthand
Platform: All
Severity: Very Low
Votes: 0
Watching: N/A
Opened By Garthand on Jul 17, 2026 11:33 am
Last Edited By Garthand on Jul 17, 2026 11:44 am

Issue #36807: DLC1RandomLightningStrikeTrigSCRIPT multiple logic errors

 
Stumbled into these while debugging a Papyrus error Pete reported for Forgotten Seasons, but since this is a Dawnguard script I figured we should probably include the fixes here. The issues are as follows:

1. There's a race condition that can result in a "no 3D" papyrus error despite the checks to ensure everything is loaded. This happens when the player leaves the cell while the script's HandleLightning function was in its wait block. GetNthLinkedRef(CurrentCastPoint).Is3dLoaded() will succeed as the Xmarker hasn't yet been unloaded, but it will have been unloaded between the check and the time the lightning attempts to fire. Adding OnCellDetach logic to immediately unregister (while avoiding a wait loop) prevents this race condition.

2. This one is a little silly, not sure how none of us caught it until now. Both CloseSoundinstanceID and FarSoundinstanceID are defined as CloseImpactSound.play(GetNthLinkedRef(CurrentCastPoint)). FarSoundinstanceID is pretty clearly supposed to use DistantImpactSound, not CloseImpactSound.