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

🐛 [bug] End triggers before activate if no cooldown #54

Open
SebMik opened this issue Sep 2, 2024 · 1 comment
Open

🐛 [bug] End triggers before activate if no cooldown #54

SebMik opened this issue Sep 2, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@SebMik
Copy link

SebMik commented Sep 2, 2024

Describe the bug
If an ability doesn't have a cooldown then end will trigger before activate.

To Reproduce
Steps to reproduce the behavior:

  1. Add an ability without a cooldown. When testing it I changed hasCooldown in ability.gd to return false, and used the fireball spell.
  2. Add some prints in the ability's activate and end funcs.
  3. Run project.
  4. Start the Simple 2D platformer.
  5. Press space to activate the fireball.
  6. See that it prints in end before activate.

Expected behavior
End is triggered after activate.

Desktop (please complete the following information):

  • OS: macOS
  • Godot version 4.3

Additional context
From what I can gather, activate emits activated at the start, which triggers _handle_ability_activated, which will call end_ability if it doesn't have a cooldown and can be ended.

@SebMik SebMik added the bug Something isn't working label Sep 2, 2024
@OctoD
Copy link
Owner

OctoD commented Sep 3, 2024

Howdy! Will look into this one, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants