# Is there a way to make this better?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-make-this-better/2705803>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [March 13, 2026, 12:04am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-make-this-better/2705803 "2026-03-13T00:04:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddave104](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ddave104/32/1000318_2.png) [@ddave104](https://forums.unrealengine.com/u/ddave104)\
**Post date:** [March 13, 2026, 12:04am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-make-this-better/2705803/1 "2026-03-13T00:04:50Z")

</div>

I have a game with multiple levels that the player can get 1,2,or 3 stars. And Im trying to save the Star per level.

That game instance is telling me the last level played. Each level has a name. And then saving the amount of star the player got.

Is there a better way to do this, im planing on 1000 levels.

Any help is appreciated thanks you

 ![Question](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/0/fc08f25ac84cc612c45656fd463abd81014a7303.png)

---

<div class="post-metadata">

**Author:** ![mteles-kokku](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mteles-kokku/32/1185846_2.png) [@mteles-kokku](https://forums.unrealengine.com/u/mteles-kokku)\
**Post date:** [March 13, 2026, 4:58pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-make-this-better/2705803/2 "2026-03-13T16:58:16Z")

</div>

Hey there!

Instead of an Int for each level, I’d make a map of Names to Ints in your SaveGame class. That way you can add new entries to the map based on the level name without having a specific Int variable for each. And if you call the `Add` function to the Map with a Name that already exists, it will overwrite, so you can always save new data just like with the separate Ints.

Here’s how you create a Map (Simply create a variable, then click the dropdown menu to the right of the Variable’s Type, and select Map)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/f/47fe18767052c3b725afd25572020d6152eb829b.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/8/e/f8ec48241a916c15ba86a7f52ce4f5d89539628d.png)

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

Then you could structure your logic like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/a/0fa027990da9c4e08f899394eda6f74f51861f42.jpeg)

More on Maps: [Blueprint Maps | Unreal Engine 4.27 Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/unreal-engine/blueprint-maps?application_version=4.27) (That’s a 4.27 guide but the information in it is still good)

---

<div class="post-metadata">

**Author:** ![ddave104](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ddave104/32/1000318_2.png) [@ddave104](https://forums.unrealengine.com/u/ddave104)\
**Post date:** [March 14, 2026, 1:30am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-make-this-better/2705803/3 "2026-03-14T01:30:49Z")

</div>

This worked perfectly, thank you
