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.

Issue Data
Status: Closed
Issue Type: Bug Report
Project: Unofficial Skyrim Special Edition Patch
Component: Skyrim SE: Vanilla
Category: Quests
Assigned To: Nobody
Platform: All
Severity: Medium
Votes: 0
Watching: N/A
Opened By DayDreamer on Mar 30, 2019 5:27 pm
Closed By Arthmoor on May 7, 2019 12:59 am
Resolution: Not A Bug

Issue #26482: defaultOnEnter.psc script issues with trigger enable parent

This script depends on a targetCountTotal that is initialized OnInit().

Unfortunately, it is often used in a trigger that has an enable parent. There seems to be a timing issue, especially with defaultSetStageOnEnter, where OnInit() is not run. This usually leaves targetCountTotal = 0, and the script runs the event/quest, even though the actors are not yet present. They deliver their lines from where they are currently walking, and/or even though the player is not present (or close enough to hear them).

Also, targetCountTotal is never initialized to 0. As a matter of good programming, assuming that OnInit() will run with 0 starting values might be a bad idea, especially as enable parents can toggle during the course of the game.

This was a bear to debug. Because the number of actors is known at the time of setting properties, the Total could also be set by hand. But that would be a lot of triggers, and highly invasive to fix! :(

Instead, we could re-write the script to set a separate flag (unused/unknown/present/absent) per actor/alias, and trigger when they are all present or unused.

So far, I've not detected the problem in any other case than the trigger having an enable parent. However, that doesn't mean it is the only failure mode. This really isn't a good design.

Related Issues: 30480  


1 comment(s) [Closed]
Arthmoor said:
This script is in use on so many objects in so many places and in so many different ways that it cannot possibly be as broken as described or people would have noticed this YEARS ago.

Showing Comments 1 - 1 of 1