TargetToTile
Responds to an active target cursor by targeting a specific tile at the given coordinates.
Tile — graphic ID of the tile to target.
X, Y — horizontal and vertical map coordinates.
Z — altitude of the target.
Does nothing if no target cursor is currently active.
This is used when a spell or action requires targeting a map tile rather than an object (e.g., area-effect spells).
Use WaitForTarget to wait for a target cursor before calling this method, or use WaitTargetTile to pre-set the target before the action that triggers the cursor.
Отвечает на активный курсор цели, нацеливаясь на конкретный тайл по указанным координатам.
Tile — graphic ID тайла-цели.
X, Y — горизонтальная и вертикальная координаты карты.
Z — высота цели.
Не выполняет действий, если курсор цели не активен.
Используется, когда заклинание или действие требует нацеливания на тайл карты, а не на объект (например, заклинания с областью действия).
Используйте WaitForTarget для ожидания курсора цели перед вызовом, или WaitTargetTile для предварительной установки цели до действия, вызывающего курсор.
procedure TargetToTile(Tile: Word; X: Word; Y: Word; Z: ShortInt);
def TargetToTile(Tile: int, X: int, Y: int, Z: int) -> None: ...
begin
Cast(spEarthquake);
WaitForTarget(5000);
if TargetID > 0 then
TargetToTile($0001, GetX(Self), GetY(Self), GetZ(Self));
end.
Cast(Spell.Earthquake)
WaitForTarget(5000)
if TargetID() > 0:
TargetToTile(0x0001, GetX(Self()), GetY(Self()), GetZ(Self()))