Camera always see score or timer


#1

So here is my next question: My 6th/7th grade students want to create a timer or scoreboard that the player/camera can ALWAYS see. How can we do that using CoBlocks?


#2

Hi @Kelly_Nickell,

the easiest way to place interface elements, such as a timer or scoreboard, to the camera is by attaching a text item to it. Here’s how it’s done.

First, create a text item and make sure it’s added to CoBlocks. Then attach it to the camera.

Then, with the setText - block you can change the item’s text as you see fit.

You can set as many text elements to your camera as you like with this method. Just make sure to consider different screen sizes so that information is always readable :slight_smile:

I’ve attached an example space that demonstrates how you can create an interactive score board. You can copy it by pressing the remix button. Hope this helps!


Stop camera rotation (up and down)
#3

Remix button!!! Yayy!!


#4

Just wondering if you could explain a bit more how the “create string with:” block works in this case, thanks 02%20PM


#5

Hi @Outpost_31,

the create string block takes two inputs and merges them into one text. In the example you showed, one part is the string "Score: ", while the other part is the number - variable score (could be 0, 1, 2, 3 etc)

The set text block accepts only strings for text, so we convert the number variable score into a string by placing it in the create string block. You could place the number variable without the create string - block, but then our text marker would only display a number instead of the ‘Score’ text in front of it.


#6

thanks for the clarification :slight_smile: