Switching Off Map Calculations

Am I right in assuming that map calculations are performed even when the map option has not been selected for a game? If so, is it possible to stop these calculations? I am looking at a game that is throwing up random errors that might be explained that way as the player is moved around explicitly with: MoveObject (player, location) and no grid has been considered beforehand.


Am I right in assuming that map calculations are performed even when the map option has not been selected for a game?

Don't think so.
The code that handles the map is:

        if (game.gridmap) {
          MergePOVCoordinates
        }

(in defaultobject.changedparent)
and:

          if (game.gridmap) {
            Grid_CalculateMapCoordinates (game.pov.parent, game.pov)
            Grid_DrawPlayerInRoom (game.pov.parent)
          }

(in OnEnterRoom)

Neither runs unless game.gridmap is true.
What error messages are you getting?


Transient errors are appearing in different places. Still head scratching! Here is one example:

> take some breadcrumbs
Error running script: Unknown object or variable 'canAdd'
Error running script: Unknown object or variable 'canAdd'
Error running script: Error evaluating expression 'canAdd': The given key was not present in the dictionary.

You pick them up.

Breadcrumbs were indeed added to the inventory.


Hmm… that's a very strange error.
Are you using any libraries which use canAdd? Because the only place it appears in the core libraries is the function ContainsAccessible; which shouldn't generate those errors because the variable canAdd is defined immediately before it's used (and there is no dictionary involved).


Thanks mrangel. It's not my game. I'm just helping out. Only standard libraries are used. A little experimentation may be needed!


I'd volunteer to take a look at it, but couldn't guarantee a fast response.


Many thanks mrangel. In the next few days we'll either take you up on that offer or post details of a workaround!


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

Support

Forums