object help

I have a class that holds a two dimensional array that is essentially a cplane for a player to navigate as a map. Is there a way that when, for example, player reaches map[3][3], it will be directed to a different map? I hope this makes sense. Any help is truely appreciated
 
  
Last edited on
Is there something special about 3,3 or is this just a special case of reaching the edge of the map?

In either case, you are going to need to check with an if statement. The complexity or generality of the if is going to depend on what you're trying to do.
They will all be a size of 5 by 5 . I want an instance for home map, dungeon map, etc. Need to transfer from one to another
That's really up to your creativity.
What would you do?
closed account (j3Rz8vqX)
This isn't difficult, but it is truly open ended.

Everything will be dependent on the integrity of your design.

We don't know what array "map"s intentions are so we cannot give it a purpose.

Is it a boolean array that states true if the player is there and false if the player isn't?

What is it encapsulated in?

What enforces valid moves?(this is where you will also detect for teleportations)

As for multiple map schemes, it will all vary on your decisions.
Last edited on
Topic archived. No new replies allowed.