Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Help with towers in a tag map!!!!

Discussion in 'World Editor Help Zone' started by Shiroaisu, Jan 7, 2010.

  1. Shiroaisu

    Shiroaisu

    Joined:
    Jul 17, 2008
    Messages:
    202
    Resources:
    1
    Maps:
    1
    Resources:
    1
    HI

    Im making a tag map called abomination tag and i want the abominations to only atack the towers when they have no other choise to reach the players (kinda like kodo tag), but they always atack the towers, I have tried to set the priority to 1 but it doest work because towers atack... how can i make this??
     
  2. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Here's something that might help:

    • Untitled Trigger 064
      • Events
        • Unit - A unit Is attacked
      • Conditions
        • (Owner of (Attacking unit)) Equal to Player 1 (Red)
      • Actions
        • Set Temp_Unit_1 = (Attacking unit)
        • Set Temp_Loc_1 = (Position of Temp_Unit_1)
        • Set Temp_Real_1 = 9999999.00
        • Set Temp_Group_1 = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Huntress))
        • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
          • Loop - Actions
            • Set Temp_Loc_2 = (Position of (Picked unit))
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Distance between Temp_Loc_1 and Temp_Loc_2) Less than Temp_Real_1
              • Then - Actions
                • Set Temp_Unit_2 = (Picked unit)
                • Set Temp_Real_1 = (Distance between Temp_Loc_1 and Temp_Loc_2)
              • Else - Actions
            • Custom script: call RemoveLocation(udg_Temp_Loc_2)
        • Custom script: call RemoveLocation(udg_Temp_Loc_1)
        • Custom script: call DestroyGroup(udg_Temp_Group_1)
        • Unit - Order Temp_Unit_1 to Right-Click Temp_Unit_2
        • Set Temp_Unit_2 = No unit


    999999 is how far you want the units to be checked. Change conditions, unit types to suit your needs. I placed some archers and hunteresses for the enemy. First my units tried to attack the archers that were in front row, but then this trigger forced them to attack the huntresses that were further back.

    If there are no hutressess, the units continue attacking the archers.
     
  3. Shiroaisu

    Shiroaisu

    Joined:
    Jul 17, 2008
    Messages:
    202
    Resources:
    1
    Maps:
    1
    Resources:
    1
    hmm i cant test it now but i will soon when i can, tks and ill tell u if it worked when possible :)
     
  4. Shiroaisu

    Shiroaisu

    Joined:
    Jul 17, 2008
    Messages:
    202
    Resources:
    1
    Maps:
    1
    Resources:
    1
    hmm there is a problem with this: if another runner passes near the abominations they will ignore him because they are right clicking on the other runner so they are only hostile to the one they are clicking...

    how can i fixx this?
     
  5. Shiroaisu

    Shiroaisu

    Joined:
    Jul 17, 2008
    Messages:
    202
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Bumpy Bumpy

    Help pls :S
     
  6. Shiroaisu

    Shiroaisu

    Joined:
    Jul 17, 2008
    Messages:
    202
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Bump... Little help pls??