why is the bullet not damaging the player

Godot Version

godot 4.4.1

Question

why the heck isn’t the bullet not damaging the player? I mean I did everything I should be doing but its still nothing

I’m making a platformer bu
the players *or the characters since i use multiple characters


the bullet


heres in game

i dont use hurt box… is that ok?

im so confused asf even AI aint helping me
or im just dumb

1 Like

Collision looks great, what do you have for code?

AI can’t be really trusted a specially because Godot had different syntax for GDScript in 3 then now in 4 .

You don’t need hurtbox but in code should have something like


func _on_body_entered(body: Node2D) -> void:
	if body.has_method("take_damage"):
		body.take_damage()

This will be for your shot and on player or enemy you need to do take_damage func
Something like:


func take_damage() -> void:
	health -= 1

never mind the bug is fixed now i just need to read the error thing at the bottom… im such a dumb ahh

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.