Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tween.kill() does not make is_valid() return false unless waiting for another tick #103107

Open
jinyangcruise opened this issue Feb 21, 2025 · 1 comment · May be fixed by #103198
Open

Tween.kill() does not make is_valid() return false unless waiting for another tick #103107

jinyangcruise opened this issue Feb 21, 2025 · 1 comment · May be fixed by #103198

Comments

@jinyangcruise
Copy link

Tested versions

  • Reproducible in v4.4.beta4.official [93d2706]

System information

Godot v4.4.beta4 - Windows 11 (build 22631) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 32.0.15.6636) - 13th Gen Intel(R) Core(TM) i5-13600KF (20 threads)

Issue description

extends Node2D

func _ready() -> void:
	var tween = create_tween()
	tween.tween_interval(5)
	
	await get_tree().create_timer(1).timeout
	tween.kill()
	printt("is valid:", tween.is_valid())
	
	await get_tree().process_frame
	printt("--------after a tick...------")
	printt("is valid:", tween.is_valid())
	

output:

is valid:	true
--------after a tick...------
is valid:	false

The kill() can not make a tween invalid immediately. Or should the document be updated and informed of this?

Steps to reproduce

use script above.

Minimal reproduction project (MRP)

use script above.

@jinyangcruise jinyangcruise changed the title Tween.kill() does not make a tween invalid unless waiting for another tick Tween.kill() does not make is_valid() return false unless waiting for another tick Feb 21, 2025
@AThousandShips
Copy link
Member

Can confirm, also happens in 4.3.stable

@Naputt1 Naputt1 linked a pull request Feb 23, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants