Signaling for combat

Godot Version



so ive been trying some stuff and messing around with it but im still having trouble getting it to work

in full, the error says
emit_signalp: Error calling from signal ‘area_entered’ to callable: ‘Node2D(’: The method expected 2 arguments but called for 1.
The second image is attack component

3rd image is health component

The 4th image is a hitbox component.

I already added all the features to the enemy, so that shouldn’t be the problem.
I was a bit confused on what to put in the attack component, but I messed around with moving and changing stuff, but it wouldn’t really work, so I’m unsure what the problem is.

i guess i cant embed more than one image so i gotta add them all real quick

i had to cut off a lot of stuff sorry if it looks messy

the area_entered signal doesn’t provide a “damage” parameter. you’ll need to get your damage value elsewhere. Since that seems to be the script that manages attacking maybe it could be a variable in that script like

var damage = 5

func _on_hitbox_component_area_entered(area):