godot-combat-system

Implements hitbox, hurtbox, damage, and health component patterns for Godot combat systems.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/DecioLuvier/Shatterless --skill godot-combat-system-decioluvier
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: godot-combat-system
Source: https://github.com/DecioLuvier/Shatterless/tree/main/.claude/skills/godot/references/godot-combat-system
Command: npx skills add https://github.com/DecioLuvier/Shatterless --skill godot-combat-system-decioluvier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Building combat in Godot often leads to fragile code: direct health subtraction that bypasses armor and invincibility frames, permanently active hitboxes causing ghost hits, and UI tightly coupled to player scripts. This Skill enforces a proven component architecture so damage flows through typed DamageData resources, HealthComponent gates, and Area-based hitbox/hurtbox filtering. ## Core Features & Use Cases - Typed Damage Pipeline: DamageData Resource with enum/flag-based damage types, crit rolls, and knockback context instead of raw numbers or strings. - Health & I-Frames: HealthComponent with take_damage, invincibility windows, and health_changed/died signals that decouple HUD from gameplay logic. - Hitbox/Hurtbox Architecture: Area3D overlap delivery with collision layer/mask filtering, animation-driven active windows, nodeless AoE via physics shape queries, and hit-stop patterns. - Use Case: When adding melee attacks to a Godot 4 action game, use this Skill to wire an AnimationPlayer-gated hitbox that delivers DamageData to enemy hurtboxes, applies i-frames, and emits signals the HUD subscribes to. ## Quick Start Use the godot-combat-system skill to add a DamageData resource, HealthComponent, and hitbox/hurtbox setup for my Godot 4 melee attack.

Frequently Asked Questions about godot-combat-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement hitbox and hurtbox combat in Godot?▼

Use Area2D or Area3D nodes with monitoring/monitorable flags and collision layers for team filtering. Hitboxes deliver a DamageData object to hurtboxes via area_entered signals, and should only be active during animation-driven attack windows, never permanently monitoring.

How do I add invincibility frames to a Godot health system?▼

Add an i-frame gate inside HealthComponent.take_damage that ignores incoming DamageData while an invulnerability timer is active. Start the timer after each successful hit so multi-hit shapes do not tick damage every physics frame.

Should I use groups or collision layers for hit detection in Godot?▼

Use collision layers and masks for physics-based hit filtering because they are evaluated by the physics engine directly. Groups are slower for high-frequency combat and should only carry secondary logic, not act as the physics gate.

How do I implement hit-stop in Godot without freezing timers?▼

Set Engine.time_scale to zero, then create a SceneTreeTimer with ignore_time_scale set to true to restore normal speed. Without that flag the thaw timer freezes along with the world and hit-stop never ends.

Can I apply damage directly with health minus amount in Godot?▼

Direct subtraction like target.health -= 10 bypasses armor, resistances, crit context, and i-frames. Route all damage through a DamageData resource passed to HealthComponent.take_damage so modifiers and signals stay consistent.

How do I handle damage in Godot multiplayer games?▼

Clients should request damage via RPC and never apply final damage locally. The server validates the hit, optionally with lag compensation and distance checks, then confirms before take_damage is applied authoritatively.