# 2 scores, total score and on-hand score that gets 10% decrease every sec that gets added to total score

**URL:** <https://forums.unrealengine.com/t/2-scores-total-score-and-on-hand-score-that-gets-10-decrease-every-sec-that-gets-added-to-total-score/1995444>\
**Category:** Blueprint\
**Tags:** unreal-engine, score, Blueprint\
**Created:** [August 28, 2024, 3:09pm UTC](https://forums.unrealengine.com/t/2-scores-total-score-and-on-hand-score-that-gets-10-decrease-every-sec-that-gets-added-to-total-score/1995444 "2024-08-28T15:09:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Psyball](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Psyball](https://forums.unrealengine.com/u/Psyball)\
**Post date:** [August 28, 2024, 3:09pm UTC](https://forums.unrealengine.com/t/2-scores-total-score-and-on-hand-score-that-gets-10-decrease-every-sec-that-gets-added-to-total-score/1995444/1 "2024-08-28T15:09:42Z")

</div>

Hello, how do I make 2 score bars A and B

‘A’ is my total score that points from ‘B’ gets added in, and ‘B’ is points I’m holding on hand for a bit

every second 10% from B points gets removed and added to the A total score

here is my ‘A’ total score blueprint, it adds numbers to my HUD when coins are collected

 ![image (5)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/8/808761fa9eebdbc76d706bc14ecf3dabfbe0acd0.webp)

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [August 28, 2024, 4:12pm UTC](https://forums.unrealengine.com/t/2-scores-total-score-and-on-hand-score-that-gets-10-decrease-every-sec-that-gets-added-to-total-score/1995444/2 "2024-08-28T16:12:57Z")

</div>

Try if calling this in Event Tick works:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/d/b8d5981e46b967d11f15b134d0225af64b8953bb.png)

Also I highly encourage you to keep your Points or Coins as float instead of int as you will have more and more rounding errors. Even if you show them as a whole number to the player.

---

<div class="post-metadata">

**Author:** ![Psyball](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Psyball](https://forums.unrealengine.com/u/Psyball)\
**Post date:** [August 28, 2024, 8:25pm UTC](https://forums.unrealengine.com/t/2-scores-total-score-and-on-hand-score-that-gets-10-decrease-every-sec-that-gets-added-to-total-score/1995444/3 "2024-08-28T20:25:12Z")

</div>

hopefully this works and shows the code:  
[A and B score posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/ydoyqxea/)  
I tried to copy your code and change it to floats instead as you suggested.  
as I’m very new to UE, I don’t understand how to make the variables have a “target input”.  
my “set/get total coins” variables only have the output but no target?

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [August 28, 2024, 8:30pm UTC](https://forums.unrealengine.com/t/2-scores-total-score-and-on-hand-score-that-gets-10-decrease-every-sec-that-gets-added-to-total-score/1995444/4 "2024-08-28T20:30:54Z")

</div>

You mean this?  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/f/b5fdfd46202248609989bb5113737ace384d8eec.png)

This whole node is just a call to the custom event below:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/4/7d4a6483ac251d68cebdea6e15247e5e1dba7753.jpeg)

The “this” in this case means that we are calling the event in this instance of the actor. Not some other actor of the same class.

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [August 28, 2024, 8:45pm UTC](https://forums.unrealengine.com/t/2-scores-total-score-and-on-hand-score-that-gets-10-decrease-every-sec-that-gets-added-to-total-score/1995444/5 "2024-08-28T20:45:47Z")

</div>

> [@Psyball](#):
>
> …and change it to floats instead as you suggested.

This makes the blueprint much simpler:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/7/b674234b0083bf8e94a2d79233abf32d85f89d32.png)  
We no longer need to keep track of the amount after the decimal point.

Edit: I was also assuming we are transferring points from A to B, however now I see that this might not be the case as B is a player controller and A does not exist. It’s just a bunch of bonus points. Is that right?

---

<div class="post-metadata">

**Author:** ![dZh0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dZh0](https://forums.unrealengine.com/u/dZh0)\
**Post date:** [August 29, 2024, 6:30am UTC](https://forums.unrealengine.com/t/2-scores-total-score-and-on-hand-score-that-gets-10-decrease-every-sec-that-gets-added-to-total-score/1995444/8 "2024-08-29T06:30:11Z")

</div>

This is just a getter. You have it in your initial screenshot:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/6/1/f617a6b1244e218ec1536cae01a112ac1c74b54e.jpeg)
