Mep3aB4uK, круто получилось но частично, создает эффект и все (, обычно я использую координаты, а не точку.Добавлено (06-07-2011, 21:13)
---------------------------------------------
я не хочу переделывать на джаз потому что вдруг потом вообще работать не будет, тут он у меня телепортироваться не хочет.
Добавлено (07-07-2011, 13:06)
---------------------------------------------
все сделал, осталось сделать две модели для красного и зеленого. 
 
Code
function Trig_Scroll_of_Town_Portal_Conditions takes nothing returns boolean 
     return GetSpellAbilityId() == 'ANcl' 
 endfunction 
 function Trig_S1 takes nothing returns nothing 
     call KillDestructable( GetEnumDestructable() ) 
 endfunction 
 function Trig_S takes nothing returns nothing 
     local unit u = GetSpellAbilityUnit() 
     local unit e 
     local effect r 
     local group g = CreateGroup() 
     local real x = GetLocationX(GetSpellTargetLoc()) 
     local real y = GetLocationY(GetSpellTargetLoc()) 
     local real dx 
     local real dy 
     local real k 
     set udg_cast = GetSpellTargetLoc() 
     call SetUnitPathing( GetSummonedUnit(), false ) //я использую способность типа "Торнадо" призывает невидимый дамми, это для видимости точки 
     call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null) 
     loop   
         set e = FirstOfGroup(g)   
         exitwhen e==null  
         if IsUnitAlly(e, GetOwningPlayer(u)) == true and IsUnitType(e, UNIT_TYPE_STRUCTURE) == true then 
             set dx = GetLocationX(GetUnitLoc(e)) - x 
             set dy = GetLocationY(GetUnitLoc(e)) - y 
             set k = dx * dx + dy * dy 
             if SquareRoot(k) <= 525.00 then 
                 set r = AddSpecialEffect(udg_tel_effect[GetConvertedPlayerId(GetOwningPlayer(u))], x, y) 
                 call TriggerSleepAction( 3.00 ) 
                 call DestroyEffect( r ) 
                 set dx = GetLocationX(GetUnitLoc(e)) - x 
                 set dy = GetLocationY(GetUnitLoc(e)) - y 
                 set k = dx * dx + dy * dy 
                 if SquareRoot(k) < 50.00 then 
                     call SetUnitPositionLoc( u, PolarProjectionBJ(GetUnitLoc(e), 70.00, AngleBetweenPoints(GetUnitLoc(e), udg_cast)) ) //я создал эту точку  udg_cast, так как не знаю как это раскрутить ( 
                 else 
                     call SetUnitX(u, x) 
                     call SetUnitY(u, y) 
                 endif 
                 set r = AddSpecialEffect(udg_tel_target[GetConvertedPlayerId(GetOwningPlayer(u))], x, y) 
                 call DestroyEffect( r ) 
                 call PanCameraToTimedForPlayer( GetOwningPlayer(u), x, y, 0.00 ) 
                 call EnumDestructablesInRectAll( RectFromCenterSizeBJ(udg_cast, 480.00, 480.00), function Trig_S1 ) 
             endif 
         endif 
         call GroupRemoveUnit(g,e) 
     endloop 
     call RemoveLocation(udg_cast) 
     call DestroyGroup(g) 
     set u = null 
     set e = null 
     set r = null 
     set g = null 
 endfunction 
 //=========================================================================== 
 function InitTrig_S takes nothing returns nothing 
     set gg_trg_S = CreateTrigger(  ) 
     call TriggerRegisterAnyUnitEventBJ( gg_trg_S, EVENT_PLAYER_UNIT_SPELL_EFFECT ) 
     call TriggerAddCondition( gg_trg_S, Condition( function Trig_S_Conditions ) ) 
     call TriggerAddAction( gg_trg_S, function Trig_S_Actions ) 
 endfunction
  
 как тут поменять цвет у модели? 
 Code
GeosetAnim { 
  static Alpha 1.000000, 
  static Color { 0.600000, 0.600000, 0.600000 }, 
  GeosetId 1, 
 } 
 GeosetAnim { 
  static Alpha 1.000000, 
  static Color { 0.600000, 0.600000, 0.600000 }, 
  GeosetId 2, 
 } 
 GeosetAnim { 
  static Alpha 1.000000, 
  static Color { 0.600000, 0.600000, 0.600000 }, 
  GeosetId 3
Добавлено (07-07-2011, 16:08)
---------------------------------------------
все закрывайте тему сделал ) 
 Mep3aB4uK, спасибо за помощь