[font=trebuchet ms]Hello Godot community, since last month from when I discovered Godot Engine I've been exploring it bit by bit I watched and learned from various tutorials and started making some random things with what I learned, I made a shoot'em up game and a relatively complete UI (main menu, settings menu, sound settings, controls, screen sizing and the rest).So lately I've been thinking about making a resource bar(HP bar, energy bar, mana bar and so on), I thought about various ways about how to make one from them are to use the draw function or to use sprites, but I want to know from you experts how you do one, I want to see others logic. So please help me I want to widen my knowledge.Thanks and I hope to get some positive responses.[/font]

Well I wouldn't call myself an "expert" but here is my approach:1) Create a healthbar sprite with a width of 1px. 2) Stretch the sprite by creating an animation of the sprite's width property (e.g. from 1px to 100px). 3) Set the animation frame according to the players health percentage.Pro:- Easy to set up- Color shifting possible by also animating the sprite colour.Con:- No "special effects" possible, just a boring ressource bar. It all looks the same from 1% to 100%.

5 days later

Godot has some controls designed for things like this - I'd take a look at TextureProgress/ProgressBar.

a month later

Hello fellow godot user, thank you for your advice and sorry for this late reply. I am more than pleased that Godot has a node for this matter, but since I am a total noob in gdscript/python (I plan to learn it in summer due to lack of time and approaching exams) I need help, can somebody make a small tutorial on how to use the Progress Bar functions ? I'd also like to see a tutorial that uses the Progress Bar filled and drained with buttons pressed so that other users like me can understand its functioning in the future.Thank you for sharing your knowledge and time.

7 years later