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

Update references to a Timer node upon renaming that node #10510

Closed
shashjar opened this issue Aug 20, 2024 · 1 comment
Closed

Update references to a Timer node upon renaming that node #10510

shashjar opened this issue Aug 20, 2024 · 1 comment

Comments

@shashjar
Copy link

Describe the project you are working on

A simple 2D game to learn how to use Godot

Describe the problem or limitation you are having in your project

References to Timer nodes are not kept and updated based on renaming actions

Describe the feature / enhancement and how it helps to overcome the problem or limitation

When I rename a Timer node (e.g. a node called attack_cooldown), it would be helpful to automatically rename or flag the references that were previously created for that Timer. For example, I might have $attack_cooldown.start() / $attack_cooldown.stop() calls or the func _on_attack_cooldown_timeout() callback. It would be nice to hold references to these in relation to the Timer node so that they can be updated or otherwise reported to the user when those are renamed.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Attach node references to the Timer (fairly straightforward for $ but maybe less so for the function callbacks?). Update them accordingly on updates to the source node.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Could definitely be an editor plugin

Is there a reason why this should be core and not an add-on in the asset library?

This is fairly reasonable/expected functionality that fits with patterns elsewhere in Godot / IDEs

@Calinou
Copy link
Member

Calinou commented Aug 20, 2024

Thanks for the proposal! Consolidating in #899.

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

No branches or pull requests

3 participants