Fix trigger terminating sections influencing delay behavior#8518
Merged
APickledWalrus merged 4 commits intodev/featurefrom Apr 1, 2026
Merged
Fix trigger terminating sections influencing delay behavior#8518APickledWalrus merged 4 commits intodev/featurefrom
APickledWalrus merged 4 commits intodev/featurefrom
Conversation
1 task
UnderscoreTud
approved these changes
Apr 1, 2026
TheMug06
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
As described in #8203, when a section has a statement that cause a delay, that delay is propagates beyond the section even if the section is guaranteed to terminate execution (e.g. with a stop statement). This creates unexpected behavior as noted in the issue.
Solution
I've adjusted Section's
loadCodemethod to consider the execution intent of the loaded section. If the loaded section results in execution terminating, then the delay state is set back to what it was before the section was loaded (i.e. the section has no effects on the delay state).There were also a few issues with SecConditional I've resolved:
thenblocks could be repeated multiple timesThis problem is not fully resolved (for other cases). It does not consider exiting a number of sections. However, this is a more complex problem that may not be possible to solve given Skript's current design. The delay of the section would apply to upper sections, but not the immediate parent (or parents if exiting multiple). Skript does not currently have a way to handle this.
Testing Completed
Added a test for the expected delay behavior.
Added a test to SecConditional for
thenbehavior.Supporting Information
Completes:
Related: none
AI assistance: none