Skip to content

local variables got removed after delay effect #158

@MellDa1024

Description

@MellDa1024

Describe the bug
local variables are removed when 'wait n tick' is executed in other listener while the delay effect is running

To reproduce

effect npc wait:
	trigger:
		broadcast "npc wait"
		delay effect
		broadcast "npc wait - delay effect"
		wait 40 tick
		continue

on right click on entity:
	if clicked entity's name is "TestNPC":
		set {_name} to "TestNPC"
		add "Dialogue1" to {_dialogue::*}
		add "Dialogue2" to {_dialogue::*}
		add "Dialogue3" to {_dialogue::*}
		add "Dialogue4" to {_dialogue::*}

		send "%{_name}% :: %{_dialogue::1}%" to player
		npc wait
		send "%{_name}% :: %{_dialogue::2}%" to player
		npc wait
		send "%{_name}% :: %{_dialogue::3}%" to player
		npc wait
		send "%{_name}% :: %{_dialogue::4}%" to player
		npc wait
		stop

on right click:
	broadcast "1 tick start"
	wait 1 tick 
	broadcast "1 tick passed"

here's a code snippet. (My original code was over 3,000 lines long, so I removed unnecessary parts until I could reproduce the bug)

  1. load this snippet in server
  2. create npc named "TestNPC"
  3. right-click the npc

Expected behavior
local variables should remain

Screenshots

Image

Server information

  • skript-reflect: 2.6.2
  • Skript: 2.14.0-pre1
  • Bukkit: Paper version 1.21.8-32-main@f0c1f85 (2025-08-14T17:02:35Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
  • Minecraft: 1.21.8
  • Java: OpenJDK Runtime Environment Temurin-21.0.6+7
  • OS: Windows 10

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions