Добавлен Стас Орлов
Сделал таймер, который после ожидания приказывает юнитам использовать таунт, но он не работает, почему?
function Trig_Pet_death_1_Func001A takes nothing returns nothing
call IssueImmediateOrderBJ( GetEnumUnit(), "taunt" )
endfunction
function smert takes nothing returns nothing
local timer t = GetExpiredTimer()
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetTriggerUnit())), function Trig_Pet_death_1_Func001A )
endfunction
function Trig_Pet_death_1_Actions takes nothing returns nothing
local timer t = CreateTimer()
local integer id = GetHandleId(t)
call TimerStart(t, 1.00, false, function smert)
endfunction
Принятый ответ
вот почему не работает:
function smert takes nothing returns nothing
local timer t = GetExpiredTimer()
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetTriggerUnit())), function Trig_Pet_death_1_Func001A )
endfunction
Сюда не передан GetTriggerUnit(), его нужно привязать на хендл таймера через хештаблицу
`
ОЖИДАНИЕ РЕКЛАМЫ...
Чтобы оставить комментарий, пожалуйста, войдите на сайт.
Отредактирован Стас Орлов
Отредактирован Берги
В Гугле - zserge.wordpress.com/2012/02/23/lua-%D0%B7%D0%B0-60-%D0%BC%D0%B8...
И где угодно www.user.su/lua