Hiya
1, I have an enemy family with many different enemies in it.
2, I want each enemy to spawn a health bar at run time.
3, I want the health bar to vanish along with when the enemy is destroyed.
As far I can see, c2 supports bits of but not all of the above at once.. i.e. I can..
1, Use a container to bind one health bar to one enemy type (not a family). Ideally I'd be able to bind objects together in containers at run time but can't see a way to do this.
or
2, Use pegging to peg health bars to enemies at run time but then have another issue:
"Event" EnemyFamily.Health<= 0
"Subevent" EnemyFamily.SetAnimation (Dead) < nb. I don't destroy him yet
"Sub-Subevent" System HealthBar.Pin.PinnedUID = EnemyFamily.UID (HealthBar.destroy)
This should look for the health bar associated to the enemy who's health just went to 0 but doesn't do anything.