• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Why locust does not disappear?

Status
Not open for further replies.
This spell casts shield around the archmage and makes him untargetable for the duration, but I can't see why he does not become targetable again after the end?

  • Shield
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Shield
    • Actions
      • Unit - Create 1 Arcane Shield for (Owner of Archmage) at (Position of Archmage) facing 270.00 degrees
      • Set ShieldBarrier = (Last created unit)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 15.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[1] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 30.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[2] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 45.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[3] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 60.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[4] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 75.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[5] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 90.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[6] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 105.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[7] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 120.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[8] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 135.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[9] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 150.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[10] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 165.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[11] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 180.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[11] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 195.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[12] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 210.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[13] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 225.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[13] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 240.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[14] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 255.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[15] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 270.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[16] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 285.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[17] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 300.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[18] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 315.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[19] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 330.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[20] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 345.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[21] = (Last created destructible)
      • Destructible - Create a Pathing Blocker (Both) (Large) at ((Position of Archmage) offset by 500.00 towards 360.00 degrees) facing 270.00 with scale 1.20 and variation 1
      • Set POS_DES_SHIELD[22] = (Last created destructible)
      • Custom script: call UnitAddAbility(udg_Archmage, 'Aloc')
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of Archmage) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Add Ethereal to (Picked unit)
          • Unit - Add Spell Immunity to (Picked unit)
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of Archmage) matching (((Matching unit) is A Hero) Equal to False)) and do (Actions)
        • Loop - Actions
          • Unit - Add Ethereal to (Picked unit)
          • Unit - Add Spell Immunity to (Picked unit)
      • Countdown Timer - Start Shield_timer as a One-shot timer that will expire in 30.00 seconds
  • Kill Shield
    • Events
      • Time - Shield_timer expires
    • Conditions
    • Actions
      • Custom script: call UnitRemoveAbility(udg_Archmage, 'Aloc')
      • Selection - Clear selection for (Owner of Archmage)
      • Selection - Select Archmage for (Owner of Archmage)
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of Archmage) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Remove Ethereal from (Picked unit)
          • Unit - Remove Spell Immunity from (Picked unit)
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of Archmage) matching (((Matching unit) is A Hero) Equal to False)) and do (Actions)
        • Loop - Actions
          • Unit - Remove Ethereal from (Picked unit)
          • Unit - Remove Spell Immunity from (Picked unit)
      • Destructible - Remove POS_DES_SHIELD[22]
      • Destructible - Remove POS_DES_SHIELD[21]
      • Destructible - Remove POS_DES_SHIELD[20]
      • Destructible - Remove POS_DES_SHIELD[19]
      • Destructible - Remove POS_DES_SHIELD[18]
      • Destructible - Remove POS_DES_SHIELD[17]
      • Destructible - Remove POS_DES_SHIELD[16]
      • Destructible - Remove POS_DES_SHIELD[15]
      • Destructible - Remove POS_DES_SHIELD[14]
      • Destructible - Remove POS_DES_SHIELD[13]
      • Destructible - Remove POS_DES_SHIELD[12]
      • Destructible - Remove POS_DES_SHIELD[11]
      • Destructible - Remove POS_DES_SHIELD[10]
      • Destructible - Remove POS_DES_SHIELD[9]
      • Destructible - Remove POS_DES_SHIELD[8]
      • Destructible - Remove POS_DES_SHIELD[7]
      • Destructible - Remove POS_DES_SHIELD[6]
      • Destructible - Remove POS_DES_SHIELD[5]
      • Destructible - Remove POS_DES_SHIELD[4]
      • Destructible - Remove POS_DES_SHIELD[3]
      • Destructible - Remove POS_DES_SHIELD[2]
      • Destructible - Remove POS_DES_SHIELD[1]
      • Unit - Remove ShieldBarrier from the game
 
Level 25
Joined
May 11, 2007
Messages
4,651
This whole thing can be replaced with a for loop..
Also your trigger contains leaks that you should remove.

set tempPoint1 = position of archmage.
For integer tempInteger from 0 to 21
{
set tempPoint2 = tempPoint1 offset by 500.00 towards teampReal degrees;
set teampReal = 15 * tempInteger;
Destructible - Create a Pathing Blocker (Both) (Large) at tempPoint2 facing 270.00 with scale 1.20 and variation 1;
Set POS_DES_SHIELD[tempInteger] = (Last created destructible)

cleanup tempPoint2;
}
cleanup tempPoint1;

  • Unit Group - Pick every unit in (Units within 500.00 of (Position of Archmage) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
  • Loop - Actions
  • Unit - Add Ethereal to (Picked unit)
  • Unit - Add Spell Immunity to (Picked unit)
  • Unit Group - Pick every unit in (Units within 500.00 of (Position of Archmage) matching (((Matching unit) is A Hero) Equal to False)) and do (Actions)
  • Loop - Actions
  • Unit - Add Ethereal to (Picked unit)
  • Unit - Add Spell Immunity to (Picked unit
Here you do the same thing.. Why don't you just replace the groups with one group since both will do the same thing?

  • Unit Group - Pick every unit in (Units within 500.00 of (Position of Archmage)) and do (Actions)
  • Loop - Actions
  • Unit - Add Ethereal to (Picked unit)
  • Unit - Add Spell Immunity to (Picked unit
Ofc you have to fix the leaks there too.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
To properly remove locust and have it removed with 100% "success" meaning the archmage is exactly the same as before you need to Remove locust, hide unhide, and then add and remove a morphing ability
 
Status
Not open for further replies.
Top