Godot Version
4.3
I have a game where there are two castles. The enemy castle will spawn enemies and they will move towards your castle. Eventually(I haven’t gotten here yet) you will spawn troops out of your castle to fight the enemies. Both castles have HP and enemies should be able to attack both the castle and your troops. I have written code for castles to have health and take damage. I have also written a code for enemies to spawn. However my code for the enemy scenes for them to move towards the castle and attack when the castle is in their attack box area2d does not work. I have attached the codes for all of it as well as the game layout and node trees. I just need help as to why my enemies will walk right through the castle collisionbox without attacking
That is the code attached to my enemy scene