GetTileMainLight1Color
Contents |
[edit] GetTileMainLight1Color(location)
Determines the color of the first main light of a tile.
int GetTileMainLight1Color( location lTile );
[edit] Parameters
lTile
The location of the tile.
[edit] Description
Returns the color (TILE_MAIN_LIGHT_COLOR_*) for the main light 1 of the tile at lTile.
[edit] Remarks
This is another one of those counter intuitive functions. While you are affecting a specific tile that tile is being identified by a location. Also the location used to locate a tile is different than the location used to locate an object, a tile is located by the integer portion of a location in that tile / 10. Or for me I just remember that tiles are numbered in a zero based integer matrix, so the lower left tile in a 3X3 area would be located with a Location-object that has a member vector whose x and y = 0.
[edit] Version
1.26
[edit] Example
//First we need to know what area the tiles are in string sArea = "My Area Name"; //Next we need to create a new vector to identify a particular tile vector vTile = Vector(0.0, 0.0, 0.0); //Next we build a location for the specific tile, in this case the //tile located at 0,0 in the area. location lTile = Location(GetObjectByTag(sAreaTag, 0), vTile, 0.0); //With the location lTile we can now get the light color for that tile. int iLight = GetTileMainLight1Color (lTile); // --- //First we need to know what area the tiles are in string sArea = "My Area Name"; //Next we need to create a new vector to identify a particular tile vector vTile = Vector(1.0, 2.0, 0.0); //Next we build a location for the specific tile, in this case the //tile located at the second column and third row (counting //from the lower left corner). location lTile = Location(GetObjectByTag(sAreaTag, 0), vTile, 0.0); //With the location lTile we can now get the light color for that tile. int iLight = GetTileMainLight1Color (lTile);
[edit] See Also
functions: | |
constants: |
author: Michael Nork, editor: Charles Feduke, additional contributor(s): Roy Fisher