Tidy Tile Mapper‎ > ‎Runtime API‎ > ‎BlockUtilities‎ > ‎

GetBlockAt

Returns the Block at the desired coordinates on the targetted BlockMap.

This is core to any general game logic or intelligence across a BlockMap. Utilizing this function you are able to sample the map itself to make decisions on behalf of your game.

Example:

If [the block beside me] is [fire] then [most assuredly, run away!]

Definition:

Block GetBlockAt(BlockMap map, int x, int y, int depth)

Return value Description
Block The Block located at the target coordinates - null if empty.

Argument DataType Description
map BlockMap The map from which you wish to retrieve the Block
x int The x coordinate of the Block.
y     int The y coordinate of the Block.
depth int The depth (z) coordinate of the Block.

Comments