WaitTargetObject
Pre-sets a target hook that will automatically target the specified object.
ObjID — serial (ID) of the object to target.
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 (from a spell, skill, or other action) and responds to it automatically. The hook is consumed after one use.
This is the recommended approach for targeting: set the hook before the action that triggers the cursor, rather than waiting for the cursor and then responding.
Does nothing if the character is not connected.
Предустанавливает ловушку таргета, которая автоматически нацелится на указанный объект.
ObjID — serial (ID) объекта-цели.
Если курсор цели уже активен в момент вызова, ловушка срабатывает немедленно. Иначе ловушка ожидает следующий входящий курсор цели (от заклинания, навыка или другого действия) и автоматически нацеливается на объект. Ловушка срабатывает один раз.
Рекомендуемый подход к нацеливанию: установить ловушку до действия, вызывающего курсор, а не ожидать появления курсора и затем отвечать.
Не выполняет действий, если персонаж не подключён.
procedure WaitTargetObject(ObjID: Cardinal);
def WaitTargetObject(ObjID: int) -> None: ...
begin
WaitTargetObject(Self);
Cast(spGreaterHeal);
Wait(2000);
end.
WaitTargetObject(Self())
Cast(Spell.GreaterHeal)
Wait(2000)
WaitTargetSelf, WaitTargetLast, WaitTargetTile, WaitForTarget