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

WaitTargetSelf

Pre-sets a target hook that will automatically target the current character (self).

Equivalent to WaitTargetObject(Self), but validates that the player ID is non-zero. If the player ID is 0, an error is logged and no hook is installed.

If a target cursor is already active at the moment of the call, the hook fires immediately. Otherwise, the hook waits for the next incoming target cursor.

Does nothing if the character is not connected.

Предустанавливает ловушку таргета, которая автоматически нацелится на текущего персонажа (себя).

Эквивалентно WaitTargetObject(Self), но проверяет, что ID игрока не равен нулю. Если ID равен 0, логируется ошибка и ловушка не устанавливается.

Если курсор цели уже активен в момент вызова, ловушка срабатывает немедленно. Иначе ловушка ожидает следующий входящий курсор цели.

Не выполняет действий, если персонаж не подключён.

Pascal

procedure WaitTargetSelf;

Python

def WaitTargetSelf() -> None: ...

Pascal Example

begin
  WaitTargetSelf;
  Cast(spHeal);
  Wait(2000);
end.

Python Example

WaitTargetSelf()
Cast(Spell.Heal)
Wait(2000)

See Also

WaitTargetObject, WaitTargetLast