Scoreboard system using components
I’m building a little whack a mole game in order to learn databinding, but I’m stuck on how to update a scoreboard properly. It’s only registering the first mole being hit.
Setup:
I have a Main artboard, a Scoreboard artboard (with a text databound to the a numeric value called ScoreMole) and a Mole 1 artboard in which the hits get registered and +75 is added to the ScoreMole value (this actually works).
On the Main artboard I have nested the Scoreboard artboard and then the Mole 1 artboard nine times.
Problem:
Only when the first mole gets hit, the Scoreboard gets updated. In the background I can see that the value for each Mole 1 artboard is being registered separately. Is there any way in I can add up these ScoreMole values and store them in a separate number value which I then tie to the scoreboard? I also tried doing this using Javascript using Gemini/GPT, but no luck so far (I can’t code sadly).
Rive link/preview:
Screenshots:
As you can see, the values do get updated, just not added up:
Thanks for your time!