# random number generator

**URL:** <https://forums.unrealengine.com/t/random-number-generator/2506759>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [May 12, 2025, 5:10pm UTC](https://forums.unrealengine.com/t/random-number-generator/2506759 "2025-05-12T17:10:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![1ventilatore](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/1ventilatore/32/1062702_2.png) [@1ventilatore](https://forums.unrealengine.com/u/1ventilatore)\
**Post date:** [May 12, 2025, 5:10pm UTC](https://forums.unrealengine.com/t/random-number-generator/2506759/1 "2025-05-12T17:10:07Z")

</div>

how do i use verse to make it choose a number from 1 to 8 randomly and for each number it sends a signal to a cinematic?  
all activated by a conditional button

---

<div class="post-metadata">

**Author:** ![DonPunch](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/donpunch/32/766927_2.png) [@DonPunch](https://forums.unrealengine.com/u/DonPunch)\
**Post date:** [May 13, 2025, 1:56pm UTC](https://forums.unrealengine.com/t/random-number-generator/2506759/2 "2025-05-13T13:56:30Z")

</div>

use GetRandomInt (low range,high range) to get the number and store it to a variable, then have a series of if statements to launch the cinematic based on the number

CinematicToPlay := GetRandomInt(1-8)  
if(CinematicToPlay=1):  
Cinematic1.Play()  
…

---

<div class="post-metadata">

**Author:** ![Astrotronic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/astrotronic/32/1194566_2.png) [@Astrotronic](https://forums.unrealengine.com/u/Astrotronic)\
**Post date:** [May 14, 2025, 3:24pm UTC](https://forums.unrealengine.com/t/random-number-generator/2506759/3 "2025-05-14T15:24:11Z")

</div>

Thanks Don,

I just wanted to add that you’ll probably need to add the[‘Random’ module](https://dev.epicgames.com/documentation/en-us/uefn/verse-api/versedotorg/random/getrandomint) to use this function.

`using { /Verse.org/Random }`
