[BUG] "unload" script runs right after leaving the frame

Đang mở
#115 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
game-dev

Hướng nghiên cứu

Tái hiện vấn đề bằng dự án mẫu đính kèm và theo dõi đường dẫn chuyển frame khi hình vuông được nhấp. Kiểm tra nơi các script unload được gọi tương ứng với việc rời khỏi frame; công việc được xem là hoàn tất khi script chạy trước khi frame thay đổi, cho phép clip của frame đầu tiên cập nhật thuộc tính của chính nó mà không ảnh hưởng đến frame tiếp theo hoặc phát sinh lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Describe the bug
when an object runs its unload script, the script is run right after the frame leaves. the most sensible thing to use unload for is to reset a clip for next time, but by the time the code tries to do so, it's already on a different frame and the clip is no longer visible.

To reproduce
Steps to reproduce the behavior:

  1. create 2 frames, stop() on the first one, and make a way to go between the 2 frames
  2. create a clip on the first frame
  3. add an unload script and make it try to set one of its own properties
  4. code will not execute properly

Expected behavior
unload scripts run right before exiting the frame

Editor version
all modern versions

Additional context
github's being github so here's a zip with a sample file: My Project3-17-2026_21-40-23.wick.zip
click the square in the bottom right to switch frames. one would expect the top left clip in frame 1 to rotate upon unloading, but it's actually the clip in frame 2 that gets rotated. if you delete the 2nd frame clip, you will instead get an error.

relevant discord thread: https://discord.com/channels/1406876763920797717/1481550313780416565

Ngôn ngữ chính
JavaScript
Star
56
Fork
24
Merge trung bình
6 ngày 23 giờ
Pull request đã merge (30 ngày)
15

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Candlestickers/Candlestick

Tất cả issue của Candlestickers/Candlestick

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.