Healthbar Tutorial

Index

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

1,081 visits, 2,242 views

Translations

This tutorial hasn't been translated.

Tools

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 Player.health divide by size so line is 100 Player.health/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.

.CAPX
  • 0 Comments

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