# GetRandomInt() won't generate a 1

**URL:** <https://forums.unrealengine.com/t/getrandomint-wont-generate-a-1/1526080>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [December 14, 2023, 8:48pm UTC](https://forums.unrealengine.com/t/getrandomint-wont-generate-a-1/1526080 "2023-12-14T20:48:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MountainKing\_1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mountainking_1/32/1105965_2.png) [@MountainKing\_1](https://forums.unrealengine.com/u/MountainKing_1)\
**Post date:** [December 14, 2023, 8:48pm UTC](https://forums.unrealengine.com/t/getrandomint-wont-generate-a-1/1526080/1 "2023-12-14T20:48:43Z")

</div>

As the title suggests, I’ve tried numerous approaches for this and no matter what, when this runs, it never chooses 1 as an option. 20 comes up but not 1  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/d/6bde11b2a9c8ad9543489cb972316ab711b55e35.png)

---

<div class="post-metadata">

**Author:** ![Mapshot\_Agency](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mapshot_agency/32/700660_2.png) [@Mapshot\_Agency](https://forums.unrealengine.com/u/Mapshot_Agency)\
**Post date:** [December 15, 2023, 10:47am UTC](https://forums.unrealengine.com/t/getrandomint-wont-generate-a-1/1526080/2 "2023-12-15T10:47:38Z")

</div>

What is the value of your PRand value? Could it be higher than 1?

Also this code can be updated with a case structure, like this:

```auto
case (ERand):
            20 => Print("CRITICAL HIT \n")
            1 => Print("ENEMY MISSES \n")
            _ => {}

```
