Триггер respawn.
Code
function TimerRespawn takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetStartLocationLoc(GetPlayerStartLocation(Player(12)))
call CreateUnitAtLoc(Player(12), GetUnitTypeId(u), l, 270)
call EnableTrigger( GetTriggeringTrigger() )
endfunction
function ActionsRespawn takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
local timer t = GetExpiredTimer()
call TimerStart(t, 5., false, function TimerRespawn)
endfunction
//===========================================================================
function InitRespawn takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterPlayerUnitEvent(t, Player(12), EVENT_PLAYER_UNIT_DEATH, null)
call TriggerAddAction( t, function ActionsRespawn )
set t = null
endfunction
Добавлено (13 Май 2012, 15:17:18)
---------------------------------------------
Триггер-то сам сделал, но у тебя не правильно сделано событие с юнитом.
У н/в нету начальной позиции