Hi,
i have enemies and bullets scenes that got instance at main scene and meet there.
Bullets hit the enemies and reduce the enemy health. im using area and group for that. Like
For bullet script:
Func area body entered(body):
İf body.is in group("enemy"):
body.health -= 10
This works.
But i dont wanna use collision shapes and areas anymore for bullets. Only raycast for detection because of optimization. i mean there are a lot of bullets and it cause a FPS drop.
but i just can't reach the enemys health variable from bullet script. Both of them are instanced scenes and i got little confused.
Not it's not to the point of bullet hell.
So im not intent to use pooling for bullets.