Issue #20626: TrapBreakableWalkway - Attempting to stop an invalid sound instance
[06/12/2016 - 12:57:03PM] error: Attempting to stop an invalid sound instance
<unknown self>.Sound.StopInstance() - "<native>" Line ?
[ (001A6FDA)].TrapBreakableWalkway.Done.OnBeginState() - "<unknown file>" Line ?
[ (001A6FDA)].TrapBreakableWalkway.GotoState() - "<unknown file>" Line ?
[ (001A6FDA)].TrapBreakableWalkway.OnCellAttach() - "<unknown file>" Line ?
The script tries to stop a sound that is not playing. There is already a tracking variable on the script to indicate whether the sound plays or not, but checking it has been forgotten in the OnBeginState event of state 'done'. Modify the latter event (starts at line 57) as follows:
<pre class="_prettyXprint _lang-">
Event OnBeginState(string asOldState)
;debug.Trace(self + ": All Boards Destroyed"
;EDIT: Added check for soundActive (if called from OnCellAttach, soundActive may be false and an error will be thrown on the papyrus log for
;trying to stop an invalid sound instance):
soundActive = false