Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

GetTileFlags

Returns tile flags in integer format (numeric bitmask).

Params:

  • Group: - 1 for land, 2 for statics; Other values ignored.
  • Tile: is the tile number.

If no uo data files loaded, or Group has values different from [1,2] - returns 0.

Related function: ConvertIntegerToFlags

Pascal Syntax:

function GetTileFlags(Group : Byte; Tile : Word) : Cardinal;

Pascal Example:

var ca : Cardinal;
    fs : TTileDataFlagSet;
begin
  ca := GetTileFlags(2, $0E75);
  AddToSystemJournal('Tile $0E75 has flags bitmask: ' + IntToStr(ca));
 fs := ConvertIntegerToFlags(2, ca);  
  {$IFDEF DWSCRIPT}
  AddToSystemJournal('Tile $0E75 has flags: ', fs);
  {$ELSE}  //Pascal Script
  IF tsfWeapon in FlagSet then
    AddToSystemJournal('fWeapon'); 
  IF tdfImpassable in FlagSet then
    AddToSystemJournal('impass'); 
  //etc
  {$ENDIF}
end;

Python Syntax:

def GetTileFlags(TileGroup, Tile): --> uint

Python Example:

    for tree_value in trees_list:
        CheckLag()
        #....
        print(f'Move to the tree {tree_value["Tile"]} X: {tree_value["X"]} Y: {tree_value["Y"]}')
        if print_flags:
            flag_set = ConvertIntegerToFlags(1, GetTileFlags(1, tree_value['Tile']))
            print(flag_set, GetStaticTileData(tree_value["Tile"])['Name'])
        MoveXYZ(tree_value['X'], tree_value['Y'], tree_value['Z'], 1, 1, True)
        #....