OctoD / godot-gameplay-systems

βš”οΈ A plugin for Godot to create your gameplay systems in a Godot way.
MIT License
509 stars 49 forks source link

πŸ› [bug] Cooldown invalid. #43

Closed Abab-bk closed 1 year ago

Abab-bk commented 1 year ago

Needless to say, create an Ability, then set the cooldown, which will be reactivated if I call activate () .

OctoD commented 1 year ago

Hello thank you for reporting.

May I ask you to write something to reproduce the behaviour and understand what do you expect against what you get?

Thank you.

A small repo would help a lot.

Abab-bk commented 1 year ago

Like " https://github.com/OctoD/godot-gameplay-systems/blob/main/docs/ability-system.md" said. (I'm just following the documentation) I created a script that creates an extension class Ability. And wrote the activate() method. Then I set its cooldown to 3.0 in the inspector. When I tried calling activate() multiple times, it took effect, completely ignoring the 3.0 cooldown I had set. Would appreciate it if you could look into this.

OctoD @.***> 于2023εΉ΄10月16ζ—₯周一 20:58ε†™ι“οΌš

Hello thank you for reporting.

May I ask you to write something to reproduce the behaviour and understand what do you expect against what you get?

Thank you.

A small repo would help a lot.

β€” Reply to this email directly, view it on GitHub https://github.com/OctoD/godot-gameplay-systems/issues/43#issuecomment-1764433417, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANFXJBDTKWRY3JTZOLOMNPTX7UVRDAVCNFSM6AAAAAA6A45EY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRUGQZTGNBRG4 . You are receiving this because you authored the thread.Message ID: @.***>

OctoD commented 1 year ago

Did you try to add a tag to Cooldown Start and To Remove On Cooldown End ability properties? (If you are creating the ability programmatically these properties can be set by code as tags_cooldown_start andtags_to_remove_on_cooldown_end.

This part is actually missing from the docs, maybe this should fix the issue.

You can see them in action in res://examples/simple_2d_platformer/player/player.tscn, clicking on the AbilityContainer node and then browsing the assigned abilities.

Thank you!

Abab-bk commented 1 year ago

ok, thanks.