Download

Where to store data on actors?

Hi, I’m trying to get my head around basic game structure, and wasn’t sure the place to store some data. I’m blocking out a concept for a grid-based level where multiple actors can be spawned to fill the spaces - a little like draughts. I’d need to keep an accessible record of how many actors I have, and which squares are occupied. Would it better to store the data in the actors themselves, and search through them all to interrogate location when I need to see if spaces are occupied, or keep something external that logs it all - like a Struct or something similar? Any advice for a noob appreciated!

Best way is to code the actors to store their information either in the save game or the game instance.

You can control everything from a central point, like the level BP or a BP in the level. It has an overview that a single actor can’t have. But typically, the actors themselves would write to storage.