TargetPresent
Returns True if a target cursor is currently active — that is, the server has requested a target and Stealth is waiting for a target response. Returns False when no target is pending.
Typically used to check whether a target request has arrived (for example after casting a spell or using a skill) before responding to it with WaitTargetObject, CancelTarget, or a similar method.
Возвращает True, если сейчас активен курсор таргета — то есть сервер запросил цель и Stealth ожидает ответа на таргет. Возвращает False, если ожидающего запроса таргета нет.
Обычно используется для проверки того, пришёл ли запрос таргета (например, после каста заклинания или использования умения), перед тем как ответить на него методом WaitTargetObject, CancelTarget или аналогичным.
function TargetPresent: Boolean;
def TargetPresent() -> bool: ...
begin
// Respond to a pending target only if one is actually active
if TargetPresent then
WaitTargetObject(Self)
else
AddToSystemJournal('No target cursor is active');
end.
if TargetPresent():
WaitTargetObject(Self())
else:
AddToSystemJournal('No target cursor is active')