How to save whether an actor is destroyed

Hi everyone I’m currently making a zombie game and have an inventory and whether the apocalypse has started which save every tick but I can’t seem to figure out how to save the items’ data being whether it is destroyed or not, could someone please help me. thanks in advance

I also forgot that I have a parent for the items (and weapons) so I don’t need to put it in each blueprint

This sounds like what youre looking for. If it’s not, explain some more.

what if instead of destroying the actor I set the visibility. How would I save the visibility of the actor?

I just tried a different tutorial And it won’t work I have posted the screenshots below. If someone could help that would be greatly Appreciated

anyone who can help me please???

OK I figured it out but I need help because, whenever I pickup say an M4A1 and then reload the game it immediately removes all M4A1’s in the scene could someone please tell me how to fix this? Please asap because I am in need of help now as I have other features to implement

It looks like youre savibg only one variable about whether something is picked up and then trying to use that one true/false to decide whether ALL of them are picked up. Did you check out the link I sent you?

Yes I did have a look at the link you sent me however it didn’t really help me so I’m just trying to figure out a different way to do it now

I have also tried with an enumeration with different variables which is an array containing the M4A1, AK 47 and the sniper and then I have it so that if it contains the sniper set sniper visibility to hidden etc. but when I reload the game it sets all snipers placed to hidden any ideas why?

Because it looks like you’re only saving one variable to control all of them.

Oh ok so would I have to have seperate variables such as ‘picked up M4A1’ and ‘picked up sniper 1’ etc or would I do something else? if something else could you explain what?

OK so after looking for a while I finally found this tutorial:

which then helped me do what I was hoping to achieve so for anyone having the same issue or a similar issue just follow this tutorial or if you want to make the entire system he does follow the whole 36 episodes and you’ll be good to go. and thank you mightyenigma for all of your help I greatly appreciate it

You can do it that way but that would mean creating a variable with a new name for every pick-uppable item in the entire game! That would be a pain.

I’m not sure how I would do it. Maybe put a Tag on each item placed in each map, and in your GameInstance create a Set, and whenever you pick up an item (or even destroy anything), you can add that item’s unique (and it has to be unique in the entire game) tag to the Set. Then when you load a map, each Item Blueprint’s constructor or pre-constructor can check the GameInstance’s ItemsPickedUp set, and see if it Finds the Tag you put in there (or matching string). If it does, then cancel construction or destroy the item.

You might want to do this at the Map level instead, or create a Save Object file with the same name as the Get Current Level Name node returns, and then you don’t have to keep a huge Set of PIckedUpAndDestroyedObjects in memory at all times, just one file for each level, but then you’d also need to have the GameInstance load that File into its PickedUpAndDestroyedItems set every time a Level opens (Or each level blueprint could do it on its BeginPlay event) and loop through and destroy things that have been picked up or killed, instead of having the items do it (to eliminate confusion over whether the file has loaded before trying to read the Set.

OK so I had a look yesterday and found this tutorial which helped me to achieve my end goal :

thank you for your help though I really appreciate it