-
Notifications
You must be signed in to change notification settings - Fork 6
MapLowLevelAPI
This documentation has still to be verified.
These describe what a tile behaves like:
- TILE_SOLID. Not walkable
- TILE_PLAIN
These describe what a tile looks like:
- TILE_GFX_SOLID
- TILE_GFX_PLAIN
- TILE_GFX_BORDER
- TILE_GFX_SNOW_SOLID
- TILE_GFX_SNOW_PLAIN
- TILE_GFX_SNOW_BORDER
- TILE_GFX_WATER
- TILE_GFX_LAVA
- TILE_GFX_NONE
- TILE_GFX_KOTH
- TILE_GFX_DESERT
obsolete
sets type and graphics of the tile at the given coordinate
see also world_set_type, world_set_gfx
ok = world_dig(x, y, TILE_PLAIN, TILE_GFX_SNOW_PLAIN)
- x : x coordinate
- y : y coodinate
- type : tile type (TILE_SOLID, TILE_PLAIN)
- gfx : tile graphics type (TILE_GFX_PLAIN, TILE_GFX_SNOW_PLAIN, ...)
- boolean : if type and graphics could be set
set the type of tile on given coordinates.
Only TILE_PLAIN will be processed. Because of the pathfinding algorithm, it is only possible to remove obstacles.
see also world_set_gfx
ok = world_set_type(x, y, TILE_PLAIN)
- x : x coordinate
- y : y coodinate
- typ : tile type (TILE_SOLID, TILE_PLAIN)
- boolean : if type was set
set the type of tile on given coordinates.
see also world_set_type
ok = world_set_gfx(x, y, TILE_GFX_SNOW_PLAIN)
- x : x coordinate
- y : y coodinate
- gfx : tile graphics type (TILE_GFX_PLAIN, TILE_GFX_SNOW_PLAIN, ...)
- boolean : if type could be successfully set
get the tile type
see also world_set_type
type = world_get_type(x,y)
- x : x coordinate
- y : y coordinate
- tile type
get the tile graphics type
see also world_set_gfx
type = world_get_gfx(x,y)
- x : x coordinate
- y : y coordinate
- tile type
find a random digged (PLAIN) tile
x, y = world_find_digged()
- none
- x coordinate of found tile
- y coordinate of found tile
add amount of food to tile of given coordinates. The amount may be negative.
diff = world_add_food(x,y,1)
- x : x coordinate
- y : y coodinate
- amount : number of food to add (or remove)
- number : difference of food count
draws a tile graphic type on coloumn 0 and coloumn -1 and row 0 and row -1
see also world_set_gfx
world_make_border(TILE_GFX_SNOW_BORDER)
- gfx : tile graphics type (TILE_GFX_PLAIN, TILE_GFX_SNOW_PLAIN, ...)
- none
fill al tiles with given graphic type
world_fill_all(TILE_GFX_SNOW_PLAIN)
- gfx : tile graphics type (TILE_GFX_PLAIN, TILE_GFX_SNOW_PLAIN, ...)
- none
get world coordianates of the center of tile with given tile coordinates
wx, wy = world_tile_center(x,y)
- x : tile coordinate
- y : tile coordinate
- x : world coodinate
- y : world coodinate
get milliseconds since game start
time = game_time()
- none
- integer