Sending a custom signal to all scenes that use the same script

Godot Version

4.2.2

Question

How do you send a custom signal to all scenes that use the same script that the signal originated from?

in short, I have a small area where bombs will slowly spawn over time. when one bomb explodes, all the bombs will explode. all the bombs run on the same script.

signal differentBombExploded

func _explode():
	get_parent().Game_over()
	differentBombExploded.emit()

func _on_different_bomb_exploded():
	print("explode")

no matter how many bombs are on the screen only the bomb that ran differentBombExploded.emit() will run func _on_different_bomb_exploded():

what am I missing here?

You should connect the bombs to a signal on a Autoload or on the bomb spawner script, if any bomb explodes call spawner.bomb_exploded.emit()

Connecting can be done on the bomb script’s _ready

var spawner: Node
func _ready() -> void:
    spawner = get_parent()
    spawner.bomb_exploded.connect(chain_explosion)

func chain_explosion() -> void:
    print("exploded from other")

func explode() -> void:
    spawner.bomb_exploded.emit()