How to create a Radial Lifebar in Construct 2

Attached Files

The following files have been attached to this tutorial:

.zip

lifebar-assets.zip

Download now 5 KB
.capx

radial-lifebar.capx

Download now 180 KB

Stats

1,637 visits, 2,591 views

Translations

This tutorial hasn't been translated.

Tools

Every wondered how to program a radial lifebar in Construct 2? In this tutorial, we’re going to see how we can build a radial lifebar with only a few sprites and lines of code.

Subscribe to Construct videos now

You can download the assets in the top left corner of the page. If you are comfortable with C2, you can also directly download the final Capx example.

The principle behind this lifebar is quite simple: we are rotating 2 black half rings over an orange ring split in 2 sprites, to mask it out.

Here is a snapshot of the events in Construct 2. Note that the LifePercent variable corresponds to a percentage, that is to say a value between 0 and 1 (ie. 80% <=> 80/100 <=> 0.8).

Support me!

If you liked that tutorial and want to see more, you can become a follower on facebook, twitter and Google Plus ! Thank you (★^O^★) !

GDquest.com 

You can find the original article at this address.

.ZIP

lifebar-assets.zip

Download now 5 KB
.CAPX

radial-lifebar.capx

Download now 180 KB
  • 0 Comments

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