Can you also tell me if it is possible in Contruct 2 to create a life bar for a family? Because it is not possible to add a container to a family with
Containers dont work with families.
You gonna have to create your own tracking system with UIDs or something similar to link the (Enemies Family + HealthBars)
Here is a very basic example of how to create and link a health bar in C2:
Basically just shows how to (Pin and link UIDs) using families.
Is a long time since I dont create UIs in Construct2 and forgot how tedious the process was. Especially when you have been using C3 hierarchies for so long time, which takes care of all behind the scenes, it is as simple as building the HealhBar in the editor and just spawning it with the enemy creating a hierarchy. Also, the picking is simple, just pick Enemy childs. Few lines of code compared to all you have to do in C2 to get it working with UIDs etc...
https://www.dropbox.com/scl/fi/gtj2nb73mcdwi6ov8lg6v/1-Health-Bar-That-Works-with-Family.capx?rlkey=fv045430xdv09n7s96qyntat9&dl=0