I'm working on a game that has areas that the player doesn't need to go to, and I want to implement a system to where they can fast travel to areas that they have already visited, the current idea I've come up with is by separating each area type into categories (I.e. caves [C] and Towns [P])
but the issue is that I don't know how to make it so that a player unlocks fast travel for an area without unlocking fast travel for areas they haven't visited.
so like, when the player visits P1 and then they trigger a variable (making it go up by one) to unlock P1 in their fast travel and then they visit P2 and trigger that variable again (making it 2) to unlock that, but on their way, they skip C1, not triggering the variable (so it's still 0) and then trigger the variable for C2 (Making it 2) so that triggers both C1 and C2, I'm trying to find a way to make it so that only C2 is available
The only idea I've had to fix this is to just make every area its own variable, but I just wanted to know if there was a simpler way to do it
sorry if this doesn't make any sense, I'm really new to all of this