IlgardIo, да естьДобавлено (01-01-2011, 22:53)
---------------------------------------------
[yaroslav], в триггере tp замени код на этот:
Code
function Trig_tp_Actions takes nothing returns nothing
local real x=GetRectCenterX(bj_mapInitialPlayableArea)
local real y=GetRectCenterY(bj_mapInitialPlayableArea)
local unit u=GetEnteringUnit()
local location loc=Location(x,y)
call SetUnitPositionLoc((u),Location(x,y))
call PanCameraToTimed(GetLocationX(loc), GetLocationY(loc),0)
set u=null
call RemoveLocation(loc)
endfunction
//===========================================================================
function InitTrig_tp takes nothing returns nothing
local region r=CreateRegion()
local rect rct=gg_rct_tp1
local rect rct1=gg_rct_tp2
set gg_trg_tp=CreateTrigger( )
call RegionAddRect(r, rct)
call RegionAddRect(r, rct1)
call TriggerRegisterEnterRegion(gg_trg_tp, r, null)
call TriggerAddAction( gg_trg_tp, function Trig_tp_Actions )
call RemoveRect(rct)
call RemoveRect(rct1)
endfunction