All Collections
Buildbox 3 Articles
Buildbox 3: Adding Score
Buildbox 3: Adding Score

In this article, I will show you how to add score and place it to your desired location.

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

In this guide, I have set up a Cube that jumps and moves straight along its path.

Thanks to Nik, he made adding a point real easy. 

First step is to click Asset Library.

Then click Assets.

Select Points and Add to Library.

Once done you will see the Sphere icon under the Objects category. Lets click it to go back to our scene then drag drop the Point object to the viewport.

From there you can scale the object and move it to your desired location.

Now lets copy and paste those point objects to the scenes by following the below instructions:
Press CTRL button then click on both Sphere.
Press CTRL C to copy it
then CTRL V to paste it to scene 1 and 2.

Now lets see how the preview looks like.

Now go back to the Mind Map and right click on the grid then select Add New UI.

Link the 3D World to the UI and double click it.

Inside the UI, drag and drop a Label where you want to see your score.

Then select Score as the Function, Points as Score Type and Current as the  Amount.

Now let us preview our game and see if it is working. 

You can also adjust your score counter while on preview. In that way, you'll be able to see where exactly the counter will show.


You can also do this manually if you wish to do so. 

To do this, lets click + Add Library
Select Sphere
Click Add to Library button

Once done you will see the Sphere icon under the Objects category. Lets click it to go back to our scene. 

Then lets drag and drop our sphere to our scene.

And scale it to your desired size. In this instance, I used 0.2.

Now move your sphere to your desired location.

 Remember, you can press W,A,S or D to duplicate your objects like what I did below.

Once done, you can copy and paste these items to another scene by holding the CTRL button then click on both Sphere.
Pressed CTRL +C to copy it
then CTRL V to paste it to scene 1 and 2.

Now lets double click the Sphere on the Assets panel so we can set its properties.

Select Start then make sure that Physics is checked.

After checking the Physics box, a new set of options will show up. Let us make sure that the Collision Shape is the same as the shape of your object.

In the Type field, you will have the option to set it as static- for non moving object and Dynamic- if it is a moving object.

Since I want my character to earn points every time it hits the sphere, I will have to use the following nodes:

  1. If Collide

  2. Add Point 

  3. Remove

Now link them together so that when our Character hits the spheres, it will add a point and then disappear.

After linking them, select the node Add Point and enter the number of score that you want your Character to earn.

Once linked, go back to If collide node and make sure that the Collision Shape is still the same as your object. In this instance I had to manually select Sphere as it was originally cube.

Now go back to the Mind Map and right click on the grid then select Add New UI.

Link the 3D World to the UI and double click it.

Inside the UI, drag and drop a Label where you want to see your score.

Then select Score as the Function, Points as Score Type and Current as the  Amount.

Now let us preview our game and see if it is working. 

You can also adjust your score counter while on preview. In that way, you'll be able to see where exactly the counter will show.

Did this answer your question?