Game Development Community

Beta 1.1 tilemap pickTile() returns incorrect value

by Tim Doty · in Torque Game Builder · 02/28/2006 (10:40 am) · 0 replies

When launching a game a different (and incorrect) result is returned for pickTile() than if run from the console.

The game loads a tile map and, in testing, queries for the tile at given coordinates. The returned tile is always offset from the real tile by +1, +1. That is, if the real tile would be 7, 8 it will return 8, 9.

Once the game has loaded issuing the same command gets the correct result.

So something in the engine corrects the off-by-one error after executing all user space commands.

Tim Doty