Damage system help

Godot Version

4.2

Question

I’m a beginner to using godot and im having difficulty figuring out how to get a damage system working. I have my enemy and player in different scenes but can’t figure out how to make that work together. When I put them into the level scene. I tried using an area 2D as a hit box with a collision and methods and testing it with “print” but it only ever shows one collision which is the player colliding with the enemy and doesn’t show it the other way around. Maybe I’m doing something wrong? I’m not sure . Any help would be appreciated. And yes I’ve checked the collision and masks.

Can you show us a screenshot of your player and enemy scene setup and their code (click the code button </> and paste in your code between the apostrophs that get created)

Hi, but it is very importan to know how to work using component pattern. This is going to be a good way to do everything in godot. I learnt it and everything is more confortable

Yeah I can do that when I get home, currently at work.

Alrighty, I’ll look into that. Thank you!

1 Like

Any good videos or anything you know of I can go to?

1 Like

Composition Pattern Example

1 Like