I'm building an singleplayer adventure map, and need a bunch of "Flags"(a few hundred maybe), which are basically variables to indicate, whether the player has visited certian places/killed enemies, etc.
I can think of two ways to do this:
- Scoreboard objectives
- Blocks at specific positions
I would just use the scoreboard, but I want the player to be able to save/load the state of all flags(at once). With blocks, you could just use the
/clone command, but scoreboards would require two commandblocks per flag to save and restore, whereas one
/clone can copy up to 32768 blocks/flags at once.
Advantages: Easy to set/check, because you can give names like visitedCityXYZ
Disadvantages: Very hard to copy/restore, because every flag would need 1 commandblock for saving and one for loading
Advantages: Easy saving/loading with
Disadvantages: Harder to set/check, because you would need to remember/look up the coordinates of every flag. The Chunk containing the blocks may unload, and all
/testforblock commands would fail.
Main question: Does anyone know a better way of building a "Flag"-system, which I can save/load, or an easier way to copy scoreboard values from/to the player.
Edit: I totally forgot, I could just put the blocks/containers into my Spawnchunk... I was placing commandblocks there to be always active, but didn't thought about using it for the flags.