Coordinate errors

So, coordinate errors have returned again! Having fixed my previous issue with the map exits not matching the appropriate lengths and having a different coordinate error that was fixed by simply fully rendering the map from the get-go, I've managed to somehow cause another coordinate error that I cannot for the life of me figure out.

So, this time I have three rooms inside of a parent room. Let's call the parent room 'Host' and each respective child room 'Room A' and so on. Room A, B & C are inside of Host but are not connected to one another and are not inside one another; Host is the only parent room. The player successfully moves into Room A, then they're moved into Room B. Moving the player from Room B into Room C seems to cause the error. Below is the error/s that pop up after the player is moved into Room C.

'Error running script: Error evaluating expression 'DictionaryItem(coordinates, coordinate)': The given key was not present in the dictionary.
Error running script: Error evaluating expression 'DictionaryItem(coordinates, coordinate)': The given key was not present in the dictionary.
Error running script: Error evaluating expression 'DictionaryItem(coordinates, coordinate)': The given key was not present in the dictionary.'

Any help would be mightily appreciated!


Are there exits connecting any of the rooms to or from the 'Host' room?

As I understand it, your script to draw the map in advance just runs around the map following all of the exits. So if rooms A and B aren't connected to each other, room B's coordinates will be unknown. If room C has an exit to another room, it will then try to use room C's (unknown) coordinates to recalculate the coords of that next room.

My suggestion would be to put invisible exits leading to any room that doesn't have an exit leading to it. Invisible exits can't be used by the player and don't show up on the map, but the script will still use those exits to work out the room coordinates.


Hmm, that did fix the coordinate error but now I've another issue.

After the player has moved through all the child rooms, they're moved off to a different room (let's call it New Host) that's connected with an invisible exit to avoid the coordinate issue. After arriving in New Host, all other rooms shown on the map are grayed out as if the player is on a higher floor; the only room that is colored appropriately as if it's on the same floor as the player is the New Host room. Any ideas how to fix this?

Edit: Actually, it's not a problem. I've decided having a map visible to the player is just a headache that I could do without so I've instead made a map of the...well, map as a jpeg and will implement it as an inventory item the player can bring up when necessary. Thanking y'kindly for the help!


I think sometimes it's easier to use an image map.
If you're interested, there was a thread some time ago where I posted a script that would put a dot on an image to represent the player's current position; just giving each room an attribute with the coordinates where the dot should be placed on the image.


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

Support

Forums