All Collections
Buildbox Features
Adding Lives to Character
Adding Lives to Character

In this guide, I will show you how to add life to your character.

Erik Juico avatar
Written by Erik Juico
Updated over a week ago

One easy way to add lives to your character is by Adding a Health Component.

Here is how to do it:
To start this tutorial, I have created a simple game with the options below.

After clicking on create, make sure your character is selected then go to the lower right hand corner of your options panel and click Add Component then select Health.

Now you will find cool additional character options like Taking Damage Animation, Taking Damage Sound, Death Delay and Health.  For now, let us try to add 3 Lives to your Character.

In the below illustration, you will see that your character dies 3 times before it takes you to the game over page.


You can also Add lives to your Character by using Checkpoints.

We will be using the same Gameplay Type as the above.

After clicking on the create button, I dragged an image to the Action portion of the Buildbox wheel  to be used as a Checkpoint.

In the Start Scene, I adjusted the size of the image I imported and change the opacity to 0 to make it an invisible Checkpoint.

Then I selected the imported Image in the Assets panel on the left portion of the screen and made changes to the Options panel to the right.

I copied the invisible imported platform by pressing CTRL+C and pasted it to every scene by pressing CTRL+V. In this case, the player will start on the scene where he dies.

Now that we have our checkpoint, let us set up a RESTART CHECKPOINT to link to our Checkpoints.

Let us drag an image for RESTART CHECKPOINT and drop it in the Actions portion of the Buildbox wheel. 

This time we will have to delete it because we don't want it as an item that we need to get in our game.
After deleting the image in the Scene Editor, go to the image on the assets panel on your left so we can edit the options for it. Change name to RESTART CHECKPOINT and select Restart Checkpoint as an Action Type.

Now lets click on the Menu Editor button in the upper right hand side and open Game Over UI by double clicking on it.

Once inside, I deleted the restart button.

And replaced it with Action Button.

Now I dragged an image that I have created to the Image section of the Options panel.

And then selected RESTART CHECKPOINT as the Action, and used the below settings for the Labels (this will serve as the available lives in the GAME OVER screen).

Now lets go to the World UI so we can make a life counter inside our game.

In the World UI, I dragged and dropped an Action Button and a Label inside.

Then I imported a graphic and drag it to the image part of the Options panel.

And used the below options.

On the label part, I just used X as the Text and adjusted the size of the label by clicking and dragging the corners of the text box.

Here is what it looks like inside the game.

Did this answer your question?