# Cubes and their numbers

**URL:** <https://forums.unrealengine.com/t/cubes-and-their-numbers/473264>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [October 21, 2020, 5:46pm UTC](https://forums.unrealengine.com/t/cubes-and-their-numbers/473264 "2020-10-21T17:46:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sacco908](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sacco908](https://forums.unrealengine.com/u/Sacco908)\
**Post date:** [October 21, 2020, 5:46pm UTC](https://forums.unrealengine.com/t/cubes-and-their-numbers/473264/1 "2020-10-21T17:46:11Z")

</div>

Hi,

I have a problem, I would like to give my cubes a number, let’s assume from 1 to 9, so I have 9 cubes each with a different number and here I have some questions.  
How to assign a number to a cube and a value  
How do I draw one number but cannot repeat itself, my target range of numbers is 1-999  
How to make it possible for me to add only larger numbers than the previous one.  
2 + 3 good  
3 + 9 good  
9 + 8 wrong  
5 + 2 wrong

I don’t count on ready-made answers, even a small hint will be good but I’m stuck here for a while

Thanks in advance for all answers

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 21, 2020, 7:45pm UTC](https://forums.unrealengine.com/t/cubes-and-their-numbers/473264/2 "2020-10-21T19:45:21Z")

</div>

If you want the cubes to just be actors, then you’re pretty much stuck with actor tags. You can put the number in there.

I’d recommend making the cubes blueprints though, then you can just add the number as a variable.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 21, 2020, 8:39pm UTC](https://forums.unrealengine.com/t/cubes-and-their-numbers/473264/3 "2020-10-21T20:39:12Z")

</div>

See if this helps:

 ![319572-screenshot-2020-10-21-213620.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/0/95033034328bff1ac27d7ba115c496546b3db560.jpeg)

It generates as many unique random numbers as there are cubes and assigns them in an ascending order. Did not test it thoroughly but it seems to deliver the result, at least at a glance.
