object help

Apr 29, 2014 at 4:57pm
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 Apr 29, 2014 at 4:58pm
Apr 29, 2014 at 5:20pm
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.
Apr 29, 2014 at 5:35pm
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
Apr 29, 2014 at 6:02pm
That's really up to your creativity.
Apr 29, 2014 at 6:19pm
What would you do?
Apr 29, 2014 at 6:26pm
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 Apr 29, 2014 at 6:26pm
Topic archived. No new replies allowed.