Healthbar Tutorial



Attached Files

The following files have been attached to this tutorial:



3,188 visits, 5,697 views



This tutorial hasn't been translated.


This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Now as name says put these bars so your screen layout looks like below

Please open Construct 2 Event Editor and Enter lines below. These lines are self explainable, understandable. So I want you to study these lines carefully and understand what I am doing with C2 instruction.

1. First instruction is player overlapping and also player Health more than Zero. If yes then subtract 20 times Delta (dt).

2. Update text 1 and 2 on 1 it will be decimal result and 2 should give you whole number because of INT

3. Now update our Healthbar remember our bar size is 100 therefore we are instructing C2 to set width to size divide by size so line is 100

4. Next line is simple as you can see for player speed. 8 directions.

Next lines I do not need to give you explanation because you people are clever, bright, and intelligent.

This brings to a close and wrap up our tutorial. I have included CAPX too. Happy learning and please do add comments. If you do that then I know my tutorial is not worthless.

God Bless

Lord Shiva I am always is with you.


  • Order by
Want to leave a comment? Login or Register an account!