Life bars and stuff (DEF-1520) (SOLVED)

Hi !

I would like to know, what is the best way to display life bars on enemies.

By the way, how can i deal with the message “ERROR:PHYSICS: Trigger overlap capacity reached, overlap will not be stored for enter/exit callbacks.” ?

Here is my game atm, this error happens when i pop too much enemies : here

1 Like

Unfortunately your link doesnt work (Error 404)

Life bars can be done both in the gui scene or the game scene.
If you like more of a bar that is following the enemy (classical RTS style) You might want to prefer game scene (even if it’s possible in gui scene). It will give you a little less hassle when it comes to camera and positioning the bar correct. Then again using the gui scene you have better tools to create a bar.
We did one in our game a couple of weeks ago and then we decided to go with game scene. We created the bar in Spine and made an animation of the bar with 2 keys. This way you can control the animation in code using the spine cursor ( from 0 - 1). Doing it in the gui scene you have the possibilities to mask a bar and animate it that way instead.

1 Like

huh… why was this post popping up :smiley: :smiley: I jst answered a year old post :stuck_out_tongue:

3 Likes

I added the ticket to the topic. I didn’t think that would push it to the top…

1 Like

Solved in Defold 1.2.103. Trigger overlap capacity is now configurable in game.project.