Combat Generator
dealer · victim · setup
GDScript 4.x
Damage Mode
Node Type
dimension
dealer node
victim node
Detection Type
Area → Areaarea_entered signal
Body → Areabody_entered signal
Body → Bodymove_and_slide contact
RaycastRayCast2D / 3D
Dealer has an Area node. When it overlaps another Area on the victim the signal fires. Both need matching collision layers.
Area node var (on dealer)
Attack Trigger
action name
key constant
bool var name
Wire your Button's pressed signal to set this bool true in _ready().
Damage & Cooldown
damage per hit
hits per attack
Cooldown timer-based
Animation
Dealer animation AnimationPlayer
Attack Conditions
Booleans that must be true or false before the attack fires. e.g. has_ammo = true, is_reloading = false.
variable namedefaultmust be
Victim Settings
health variable
max health
victim group
death signal
Victim AnimationPlayer hurt / death anims
Dealerattacker script
# tap Generate to produce code
Victimtarget script
# tap Generate to produce code
Setup_ready() + groups + layers
# tap Generate to produce code