About this spell

Status
Not open for further replies.
Level 5
Joined
Jul 30, 2012
Messages
93
Hi,

i have a problem about this trigger.It must freeze enemy hero for 2 seconds.But if we are in 2. team, that's works well.But if we are in 1. team dummy never freezes.I think the dummy is friend with 2. team but i don't know how to fix.Can someone help?

  • Ice Type
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set UniversalCasterType = Universal Caster
      • Set EA_DummyType = Elune's Arrow (Dummy)
      • Custom script: set udg_UniversalCaster = CreateUnit(Player(11), udg_UniversalCasterType, 0, 0, 0)
      • Set EA_Ability = Ice Type-[W]
      • Set EA_Speed = 600.00
      • Set EA_DetectionRange = 150.00
      • Set EA_SpeedPerInterval = (EA_Speed x 0.03)
  • Ice Type Loop
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to EA_Ability
    • Actions
      • Set EA_MaxIndex = (EA_MaxIndex + 1)
      • Set TempUnit = (Triggering unit)
      • Set TempLoc = (Position of TempUnit)
      • Set TempLoc2 = (Target point of ability being cast)
      • Set EA_Angle[EA_MaxIndex] = (Angle from TempLoc to TempLoc2)
      • Unit - Create 1 EA_DummyType for (Owner of (Triggering unit)) at TempLoc facing EA_Angle[EA_MaxIndex] degrees
      • Set EA_Arrow[EA_MaxIndex] = (Last created unit)
      • Trigger - Turn on Ice Type Loop 2 <gen>
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Custom script: call RemoveLocation(udg_TempLoc2)
  • Ice Type Loop 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EA_MaxIndex Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • For each (Integer EA_CurrentIndex) from 1 to EA_MaxIndex, do (Actions)
            • Loop - Actions
              • Set TempLoc = (Position of EA_Arrow[EA_CurrentIndex])
              • Set TempLoc2 = (TempLoc offset by EA_SpeedPerInterval towards EA_Angle[EA_CurrentIndex] degrees)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within EA_DetectionRange of TempLoc) and do (Actions)
                • Loop - Actions
                  • Set TempUnit = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (TempUnit is A structure) Equal to False
                      • (TempUnit is Magic Immune) Equal to False
                      • (TempUnit is Mechanical) Equal to False
                      • (TempUnit is alive) Equal to True
                      • (TempUnit belongs to an enemy of (Owner of EA_Arrow[EA_CurrentIndex])) Equal to True
                    • Then - Actions
                      • Unit - Kill EA_Arrow[EA_CurrentIndex]
                      • Unit - Move UniversalCaster instantly to TempLoc
                      • Unit - Order UniversalCaster to Human Mountain King - Storm Bolt TempUnit
                    • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Playable map area) contains TempLoc2) Equal to False
                • Then - Actions
                  • Unit - Kill EA_Arrow[EA_CurrentIndex]
                  • Unit - Move UniversalCaster instantly to TempLoc
                  • Unit - Order UniversalCaster to Human Mountain King - Storm Bolt TempUnit
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (EA_Arrow[EA_CurrentIndex] is dead) Equal to True
                • Then - Actions
                  • Set EA_Angle[EA_CurrentIndex] = EA_Angle[EA_MaxIndex]
                  • Set EA_Arrow[EA_CurrentIndex] = EA_Arrow[EA_MaxIndex]
                  • Set EA_CurrentIndex = (EA_CurrentIndex - 1)
                  • Set EA_MaxIndex = (EA_MaxIndex - 1)
                • Else - Actions
              • Unit - Move EA_Arrow[EA_CurrentIndex] instantly to TempLoc2
              • Custom script: call RemoveLocation(udg_TempLoc)
              • Custom script: call RemoveLocation(udg_TempLoc2)

P.S:Also there is a unknown dummy on middle of my map.I think it's associate with this trigger. ^^
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
u tryed add to neutrl player hostile or passive?

Custom script: set udg_UniversalCaster = CreateUnit(Player(11), udg_UniversalCasterType, 0, 0, 0)

it is

Custom script: set UniversalCaster = CreateUnit(Player 12, UniversalCasterType, x=0, y=0, facing angle=0)

and the center of map is at 0,0 coordinates so x=0,y=0 cewnter of, and u create exactly there the unit
 
Status
Not open for further replies.
Top