# Removing played level - question

**URL:** <https://forums.unrealengine.com/t/removing-played-level-question/2650106>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [August 22, 2025, 3:43pm UTC](https://forums.unrealengine.com/t/removing-played-level-question/2650106 "2025-08-22T15:43:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wiNt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wiNt](https://forums.unrealengine.com/u/wiNt)\
**Post date:** [August 22, 2025, 3:43pm UTC](https://forums.unrealengine.com/t/removing-played-level-question/2650106/1 "2025-08-22T15:43:38Z")

</div>

Hello!

I have some kind of problem which I can’t figure out for few days already and I know that for some of you thats something really basic.

I want to create system where there are 5 levels.  
First level is main.

In first level player push the button and then randomly it select one of 4 levels to play.  
Once on level 4 player push the button again, game choosing rest of the levels to play (and level 4 need to be removed from the array since we played it already and can’t be choosed randomly again when we play other levels).

---

<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:** [August 22, 2025, 5:51pm UTC](https://forums.unrealengine.com/t/removing-played-level-question/2650106/2 "2025-08-22T17:51:53Z")

</div>

I assume you’re using ‘open level’?

You need to keep the array of levels in the game instance. When you load the first one, you can take it out of the array, then ask the GI to load a random one

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/f/34f8ae6d44e26a28b4c2a6c7631c96584a8c576b.jpeg "How to Create a Game Instance in Unreal Engine 5 - Carry Data Between Levels") ](https://www.youtube.com/watch?v=sWh1jgHb6Tw)

This vid just shows you about the GI. If you get stuck, just come back here…

---

<div class="post-metadata">

**Author:** ![wiNt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wiNt](https://forums.unrealengine.com/u/wiNt)\
**Post date:** [August 23, 2025, 7:07pm UTC](https://forums.unrealengine.com/t/removing-played-level-question/2650106/3 "2025-08-23T19:07:29Z")

</div>

Hello!  
Thank you for your answer.

So basically…I stuck

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

I created the game instance, put there Selected Level variable.  
This code is inside my button blueprint, because I just want that when I push the button in the end of the level, player goes to random level and the level he played is removed.

I know that there need to be Random Integer in Range and Remove Index somewhere. But I’m really lost…

---

<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:** [August 23, 2025, 7:51pm UTC](https://forums.unrealengine.com/t/removing-played-level-question/2650106/4 "2025-08-23T19:51:08Z")

</div>

Button code

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/9/b/59bc25f034805e8207388b3d6f75b709b6fcee97.png)

Game instance

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/2/0e2e96c3743a2989736427ec09c78b61c7c6cead.png)

Result

![RandLev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/d/97d82bd2765e07939dd73d0b956d47722dbddf2c.gif)

---

<div class="post-metadata">

**Author:** ![wiNt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wiNt](https://forums.unrealengine.com/u/wiNt)\
**Post date:** [August 23, 2025, 8:00pm UTC](https://forums.unrealengine.com/t/removing-played-level-question/2650106/5 "2025-08-23T20:00:05Z")

</div>

Oh my!

Thank you very much! I literally spent on it about 3 days and you did it in few minutes.  
I hope one day I will have that knowagle as you. Thank you again!

---

<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:** [August 23, 2025, 8:17pm UTC](https://forums.unrealengine.com/t/removing-played-level-question/2650106/6 "2025-08-23T20:17:46Z")

</div>

Keeping going 🙂
