โ† All examples

godot components

Dash ability with charges and invulnerability frames

Dash at a fixed speed for a set time in a locked direction, spend and recharge charges one at a time, keep a fraction of the speed on exit and stay invulnerable for a window that can outlast the dash.

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • baltor_test.gd
  • component.json
  • dash_ability.gd
  • inspect_gdscript.py
  • run_tests.gd
  • test_package.py
  • tests/test_dash_ability.gd
  • verification/native.json

How it works

Class
BaltorDash, extends Node
Methods
try_dash(direction: Vector2) -> bool; advance(delta: float) -> void; cancel() -> void; is_dashing() -> bool; is_invulnerable() -> bool; get_dash_velocity() -> Vector2; get_exit_velocity() -> Vector2; get_charges() -> int; and 1 more
Signals
dash_started, dash_ended, charges_changed
Exports
dash_speed, dash_time, max_charges, recharge_time, invulnerability_time, end_speed_factor, auto_advance
Placement
res://baltor/godot_components/dash_ability/

Recorded checks

godot 4.7.2.stable.official.ed1daf0bf

  • godot_parse_check_only
  • godot_gdscript_tests
  • godot_tests_reject_gutted_component
  • godot_editor_import
  • godot_contract_reflection
  • godot_readme_usage_compiles

Limits to consider

Keeps time and velocity only; the owner applies the velocity and checks is_invulnerable() when taking damage. 2D vectors. The dash does not stop at walls by itself; call cancel() on a collision if needed. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.