Using Sprites as score (Request)

MissBig 3 years ago updated by Elin 2 years ago 13

Hi, I was wondering can someone please do a simple tutorial on how you would be able to use number sprites as scoring. Like in Tappy plane assets there are the numbers that are used as sprites. I know you most likely do an array but I couldn't work that out. With playmaker, they use an array in that tutorial.

Like this example https://www.youtube.com/watch?v=_mPQUKM-tZE

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

In Bolt you use Lists instead of arrays. A List is basically the same thing as an array except it can be dynamically updated at runtime at the cost of some performance. Array support will be added to Bolt 2 at some point after release. 

Oh ok, how can you do this with a list? Can I please have an example of how it can be done or even better a tutorial.

I decided to use textmesh pro instead. So I can get nice effects with this. I did however partly work out how to use sprites but the for loop kept on crashing. Not enough experience with coding on my part.


I hope this helps.

sorry I wanted to do it with number sprites not normal text. Like in Tappy plane game.


I thought you want to use textmesh pro instead?
I'm not familiar with sprites. Never used them but for a sprite newbie I would do it like this:


sorry had a death in the family but the sprite numbers are exactly what I was looking for thank you. I wanted sprites at first but when I couldn't do that I decided to go with text mesh pro because of the text effects.

one floor with this is that when getting to 100 it will go to 109 instead of 101 for next number.

I see the problem.
I gonna have a look at it later this day.



I did work out this but numbers start on the left-hand side instead of the right-hand side and I couldn't work out what to do if the timer reaches 9999. Please note the number sprites are from Tappy plane assets by Kenny which can be downloaded for free. 

By the way, absolutely love bolt. I am not a coder but have worked out how to read code and try to implement it with bolt.

This should work:


I was first testing with char variables but then I saw you are using this node:
I did not know this exists. Thank you!

To extend it just copy one of the super units. Add a new sprite object (Tenthousand) and add a zero inside the string format node. 

Thank you. I had to search for the substring. I actually used the playmaker tutorial but just did it with bolt instead. So some things didn't work for me with bolt.


That's just one thing about practice.

I had worked with Playmaker for about 3 years and was constantly confronted with restrictions and had to either access the custom actions from the ecosystem or hire a programmer to program custom actions for me.

With Bolt I could do almost everything natively.