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.
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.