# Help me with my save system

**URL:** <https://forums.unrealengine.com/t/help-me-with-my-save-system/596099>\
**Category:** C++\
**Tags:** unreal-engine, UE4-26, Blueprint, question\
**Created:** [July 3, 2022, 1:02pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099 "2022-07-03T13:02:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 3, 2022, 1:02pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/1 "2022-07-03T13:02:04Z")

</div>

i have a save system i will tell u how it work (the thing i want to know is how to load it correctly like how can i give from the array the correct values like i dont want the wolf take the fox transform or both of they take the same transform ) ( if u want any more info just tell me )  
some info(i have a actor bp ) (it auto save every sec)(it take all actors transform in 1 array )

1 every actor i want to save have an interface that take the transform and health and other in array

2 evrey time it save it clear the array and replace it with new value

here some screen shot to under stand it

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/b/9bb6e24315432291751938817492627891724e34.png)  
 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/7/ca7f2fa3523eb313465090efa3f68cf671d5535a.png)  
 ![3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/6/ff60e679272e5763ee83f6347024c784b9fd052b.png)  
 ![4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/2/ab223810cc05d82ab125b2b632b3fdc8abd3b3ff.png)

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [July 3, 2022, 1:34pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/2 "2022-07-03T13:34:29Z")

</div>

Hello!!  
You should use Paint to remove the EU5 child windows…the code is very small…it’s hard to read. You will get more help if you do that.  
Cheers!!

---

<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:** [July 3, 2022, 1:53pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/3 "2022-07-03T13:53:56Z")

</div>

I don’t see ‘save game to slot’ there…

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 5, 2022, 8:56am UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/4 "2022-07-05T08:56:02Z")

</div>

there is in the 2nd pic in the left

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 5, 2022, 8:57am UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/5 "2022-07-05T08:57:16Z")

</div>

there is in 2nd pic

---

<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:** [July 5, 2022, 9:18am UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/6 "2022-07-05T09:18:16Z")

</div>

This is my save game 101, it covers the basics:

 ![Using save game](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/f/9f552cc49441193398389fb2baa1287663b0e638.jpeg)

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 7, 2022, 7:22pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/7 "2022-07-07T19:22:02Z")

</div>

you know i have a save system but my problem is with the load i take wolf and fox transform in 1 array and sometime they the fox take the wolf transform and i have more than 1 wolf and more than 1 fox i want each fox take the right transform and each wolf take the right transform

---

<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:** [July 7, 2022, 7:51pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/8 "2022-07-07T19:51:09Z")

</div>

Just have an array of wolves, and an array of foxes ( locations ).

🙂

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 8, 2022, 1:34pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/9 "2022-07-08T13:34:36Z")

</div>

yeah but how can i tell if the wolf took another wolf location cuz they have health and other stuff  
so maybe the wolf health change and the fox is the main player so what will happen if a fox took a wrong transform with another player

---

<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:** [July 8, 2022, 1:41pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/10 "2022-07-08T13:41:58Z")

</div>

You can give the wolves IDs. Just an integer, it can even be their index in the location array.

When a wolf spawns ( or is placed in the world ), it takes the next ID. It also saves this ID along with it’s position and health etc.

Next time you play the game, when the wolves spawn, when they get their ID, they know where they were, and the other information.

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 8, 2022, 4:38pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/11 "2022-07-08T16:38:44Z")

</div>

okey thx but how can i give each of them an ID with the health and location

---

<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:** [July 8, 2022, 5:28pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/12 "2022-07-08T17:28:00Z")

</div>

The wolf BP, make an int in there. Set it to 0 for the first wolf. That wolf will save location in index 0 of the location array, and 0 of the health array.

Same for 1, and 2 etc.

If you have already put the wolves in the level, just set the ID on each wolf.

If you’re spawning wolves, you need to get each one an ID as you spawn it, and it will put itself in the right location, with the correct health.

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 9, 2022, 8:54am UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/13 "2022-07-09T08:54:18Z")

</div>

am spawning so i need to save the old id and spawn so the next spawn will be ( (the old id ) + 1)  
is this right okey  
(but how can i put the id with the health and location )

- you are really a community hero

---

<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:** [July 9, 2022, 9:55am UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/14 "2022-07-09T09:55:52Z")

</div>

The ID _is_ the index in the array! 🙂

So the thing with ID = 3 has its transform at

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/2/7023040921532f6da742b75558fb03c91ccca077.png)

---

<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:** [July 9, 2022, 10:13am UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/15 "2022-07-09T10:13:35Z")

</div>

You just have arrays in the save game like this

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/0/f00eedfe9fe5d634744aa670f2c66ff796a3e461.png)

Here’s a mock up. When saving

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/9/909997ad54754489fb3041c4e4264c89b27d27a3.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/a/30aa67199172c5b776d0b977939a0ca14899589f.png)

When spawning

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

Where ‘get save game’ is

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

You see, each blueprint has an ID, and that is its index in the array.

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 9, 2022, 12:09pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/16 "2022-07-09T12:09:12Z")

</div>

thx this helped me alot i will tell u if i needed anything about this

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 10, 2022, 12:29pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/17 "2022-07-10T12:29:00Z")

</div>

wait a quick question  
if i placed actor in the world and have instance Editable id so i can change it manually if i wanted to take all of the id should use array or singular value i will take it in a blueprint interface  
i have more than 1 actor with the id instance Editable

---

<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:** [July 10, 2022, 12:45pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/18 "2022-07-10T12:45:17Z")

</div>

You can mix spawned actors with IDs and manually placed actors. Just make sure, before you start spawning, that you have already put the manually placed actors in the array, then you can carry on numbering from there.

You can just use GetAllActorsOfClass and check their IDs before you start spawning.

---

<div class="post-metadata">

**Author:** ![Td1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/td1/32/894132_2.png) [@Td1](https://forums.unrealengine.com/u/Td1)\
**Post date:** [July 10, 2022, 3:23pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/21 "2022-07-10T15:23:39Z")

</div>

hey i just made a system but i found out it never update the values like  
when i re join i got my location right but when i move then leave and rejoin the location didnt change its the same from the first time i stopped playing  
can i have the solution pls here is the the work

> **[save sys bug posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/rz5q5dl9/)**
>
> No description provided

and if u couldn’t enter the link i can send pictures if u want

---

<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:** [July 10, 2022, 6:48pm UTC](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099/22 "2022-07-10T18:48:36Z")

</div>

Nearly. You need a cast here

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/1/241177c46eebf3431423255737bd427cc31f537c.png)

Also, notice you’re not saving anything if the save game exists

These

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/0/70070a0b01e7b1dd49cf40438c461dba8c1d0e62.png)

should both come from the SG reference.

[Next page](https://forums.unrealengine.com/t/help-me-with-my-save-system/596099.md?page=2)
