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

TargetToXYZ

Responds to an active target cursor by targeting map coordinates without specifying a tile graphic.

X, Y — horizontal and vertical map coordinates.

Z — altitude of the target.

This is equivalent to calling TargetToTile(0, X, Y, Z) — the tile graphic is set to 0 (ground).

Does nothing if no target cursor is currently active.

Use WaitForTarget to wait for a target cursor before calling this method, or use WaitTargetXYZ to pre-set the target before the action that triggers the cursor.

Отвечает на активный курсор цели, нацеливаясь на координаты карты без указания graphic тайла.

X, Y — горизонтальная и вертикальная координаты карты.

Z — высота цели.

Эквивалентно вызову TargetToTile(0, X, Y, Z) — graphic тайла устанавливается в 0 (земля).

Не выполняет действий, если курсор цели не активен.

Используйте WaitForTarget для ожидания курсора цели перед вызовом, или WaitTargetXYZ для предварительной установки цели до действия, вызывающего курсор.

Pascal

procedure TargetToXYZ(X: Word; Y: Word; Z: ShortInt);

Python

def TargetToXYZ(X: int, Y: int, Z: int) -> None: ...

Pascal Example

begin
  Cast(spFireField);
  WaitForTarget(5000);
  if TargetID > 0 then
    TargetToXYZ(1234, 5678, 0);
end.

Python Example

Cast(Spell.FireField)
WaitForTarget(5000)
if TargetID() > 0:
    TargetToXYZ(1234, 5678, 0)

See Also

TargetToObject, TargetToTile, WaitForTarget, WaitTargetXYZ