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

Missing explanation for return values from Tween methods #5091

Closed
snoopdouglas opened this issue Jul 14, 2021 · 2 comments
Closed

Missing explanation for return values from Tween methods #5091

snoopdouglas opened this issue Jul 14, 2021 · 2 comments
Labels

Comments

@snoopdouglas
Copy link
Contributor

Your Godot version:
3.3.2

Issue description:
Tween's interpolate_property and start methods return bools, but there's no explanation in the docs for what they mean.

They always seem to return true whenever I use them, but in order to avoid a warning I need to capture the value for an assert or something, so it'd be good to know for sure that true is what I should expect on success - if that is indeed the case.

URL to the documentation page:
https://docs.godotengine.org/en/stable/classes/class_tween.html

@timothyqiu
Copy link
Member

They return false if the requested operation can't be completed successfully. For example, when trying to start the tween before being added to the scene tree, or any of the parameters does not make sense (e.g. when object is null for interpolate_* methods).

... and these methods are all changed to return nothing in 4.0 in godotengine/godot#36844 🤣

@akien-mga
Copy link
Member

Fixed by godotengine/godot#56639.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants