Game Development Community

PickTile bug?

by Drew -Gaiiden- Sikora · in Torque Game Builder · 02/28/2005 (6:04 pm) · 4 replies

Sry if I'm just using this function wrong, but when I do this:
echo("Brick location:" SPC $brickLayer.pickTile("0 0"));
The console prints out
Brick location:

#1
03/07/2005 (5:39 am)
Only just noticed this post. You probably know this by now but this in the general forums.

Still having the problem?

All I can say is that "PickTile()" returns nothing if no tile exists at that world location. Not really enough info to help any further, sorry.

- Melv.
#2
09/11/2005 (1:40 am)
The T2D reference doc says

Quote:pickTile()
Picks a tile.
(int tileX / int tileY )
tileX/Y Selected Tile.
Returns the logical tile position (x / y) if valid else returns nothing. All rotation and panning is taken into account.

which makes it sound like it's expecting a row and column id parameter instead of a worldPosition parameter.
#3
09/11/2005 (1:40 am)
Maybe that's why he was using 0 0 (int tile X / int tile Y)
#4
09/11/2005 (2:30 am)
This is an old post! ;)

This doco typo has been mentioned a few times in the past and was amended.

Here's the new entry...

Quote:
pickTile() Picks a tile. ( x / y )

%values = %obj.pickTile( "100 50" )

X/Y World Position.

Returns the logical tile position (x / y) if one exists at the specified world-position else
returns nothing. All rotation and panning is taken into account.

Hope this helps,

- Melv.