Individual unit health bars

0 favourites
  • 4 posts
From the Asset Store
Custom animated Health Bar - check youtube video to make it yourself
  • Hello again C2 community.

    Every time I think I'm getting the hag of the event system I try something out and POW, back to square one.

    I'm using the RTS template, and am currently trying to create health bars for my individual units.

    I'm trying to follow the same method used in the template to tie health bars to bases as is used to tie tank turrets to bases;

    So I create my health bar from 2 sprites, put it in a container and use the same technique (initially with just one health bar), and it works great;

    However all health bars seem to just stick to the one tank base. I don't understand why the technique works fine for tank and turret but not for me new health bar.

    Sorry, I can't include urls (to capx) due to my low cred. But I hope the images will show.

  • Are you sure your health bars are also in the same container with your tank bases and turrets? (Just putting health bars in a seperate container will not work, the container must have tank base, tank turret, and two health bars)

  • Are you sure your health bars are also in the same container with your tank bases and turrets? (Just putting health bars in a separate container will not work, the container must have tank base, tank turret, and two health bars)

    That's a really good point, so I add my health bar components to the same group as the turret and base;

    It's working now - but It appears that the assignment of a health bar is pretty random.

    Do I need to delete and recreate each tank to bring the UID's closer together?

    UPDATE

    Deleting all the tanks and recreating them from (copy in memory) has done the trick, thanks for your help Windwalker.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You are welcome

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)