how to make a pair of scene ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By indrata

Please help how to create a pair of scene, so when i click one of them, both will have the same action ( for example both will be hidden)

:bust_in_silhouette: Reply From: Magso

You need an external condition they can all react to. The scene that is clicked needs to tell either a singleton or parent which can 1- run a behaviour for all the scenes or 2- have a condition or signal that gives the scenes the go ahead to execute their behaviour.
A small example would be something like

if get_parent().clicked:
    visible = !visible

Or

while true:
    yield (get_parent(), "clicked_signal")
    visible = !visible