Question about breaking the map & coordinate errors.

So, here's my issue. I've got a room, let's call it Room A. I've got a second room, let's call it Room B. Room A and Room B are connected at a lower-right diagonal; this connection is 3x the length of a normal room-to-room connector.

If I move from Room A to Room B and then back to Room A, my icon on the map grid only travels approximately the normal 1x distance back along the 3x connector to Room A. The game treats it as if I've re-entered Room A, which I technically speaking have done as the room description pops up stating so; however, this completely breaks the map as my icon is no longer going from room-to-room as it should do, but is instead wildly offset from where it should be.

Is there any way to fix this?

As an addendum, another issue I'm having is that if I move the player from one room to another that they haven't yet explored, the game gives me this: 'Error running script: Error evaluating expression 'DictionaryItem(coordinates, coordinate)': The given key was not present in the dictionary.'

Any help would be mightily appreciated!


Have you checked that the exit's length is set correctly?

The exit from A to B and the exit from B to A are separate exits. You can tick a box to automatically create both at the same time, but if you do something like changing the map length of the exit, you will need to do for both directions.

Otherwise, I'm not sure what might be causing it.


When you enter a room, the map engine looks at all the exits, and determines the adjacent rooms' coordinates by adding/subtracting the exit length onto the coordinates of the current room.
If the room you just entered has never been connected to by an exit from a previously-visited room, this causes the error you've seen.
If you know the coordinates of the room you're moving to, you could set them manually before moving. You would do something like:

Grid_SetGridCoordinateForPlayer (game.pov, someroom, "x", 27)
Grid_SetGridCoordinateForPlayer (game.pov, someroom, "y", 8)
Grid_SetGridCoordinateForPlayer (game.pov, someroom, "z", 0)

I think there should be a better way to do this, but I'm not sure what it is.


I think I can help on the second issue...
Quest maps everything as you move, and places the rooms relative to each other, as you visit them.
Quest doesn't create the full map then only show where you are.
When you jump, Quest can't figure out where you currently are relative to where you where...
(Clear as mud, I assume...)
It would be better if there was a way to place all the rooms, like in a grid, then have Quest only show the rooms that you visited.
OR, if Quest had a manual way to place the rooms on an X / Y grid, then you could control where the rooms are placed.
Altho, this "could" explain problem one as well. (maybe)
Maybe Quest needs a better mapping function.
But, I think this is a throwback to the "old" text adventures where you moved on a "grid" and all the rooms were the same size and aligned North-South and East-West...
(Used a lot of graph paper back then!!!)


Aha, that first bit fixed the issue I was having with the map breaking. Thanking y'kindly!

As for the second bit, excuse me for being a bit inexperienced here but how exactly do I go about finding out the co-ordinates of a room? And after that, how do I utilize the code you laid out there/how do I implement that?


The easiest way is probably to draw a sketch of the map and count squares. The starting room's coordinates are zero, I think. Every square to the right is +1 to the x coordinate, and every square down is +1 to the y.
z is up and down, but I don't remember if positive is up or down.

If you can work out the coordinates of the room you're going to teleport to, it just takes 3 lines to set that room's coordinates. You can do it just before you transport the player there, and it should work fine.

If there isn't a path the player can take back from where you teleported them, it might be easier to just pick some numbers, large enough so it's not near where they started.

I think the tutorial might include some alternate ways to solve this, such as a script which traverses the whole map and works out the coordinates of every room. But it's 2am, I'm half asleep, so I can't really remember how to do that off the top of my head.


Aha, I think I figured out a solution! Thanking y'kindly for the input!

For anyone reading this and wondering how I fixed the issue, or at the very least came up with a solution, I ended up using the code listed in the map tutorial to make the entire map visible from the start of the game (not an issue in my game, thankfully) which fixed needing the coordinates for other rooms/I no longer get the error because Quest can't tell what space I'm in.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums