How do I pick unit with locust ability?

popo80000

New Member
Reaction score
20
I made a spell that dispel magic..
Eg. when my spell move through elune arrow, the elune arrow will be destroyed... But instead it did not destroy, cos of the Locust Ability, how do i pick the unit even if it has locust ability??
(As i had tried to removed locuts ability from the unit, and the dispel magic successfully removed the unit(Without Locust Ability)).

This is my trigger below:
Trigger:
  • Time Wave Effects
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set TimeWave_DummyLoc = (Position of TimeWave_Dummy)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TimeWave_Dummy is alive) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TimeWave_Distance Greater than or equal to TimeWave_MaxDistance
            • Then - Actions
              • Unit - Kill TimeWave_Dummy
              • Destructible - Pick every destructible within 450.00 of TimeWave_DummyLoc and do (Actions)
                • Loop - Actions
                  • Destructible - Kill (Picked destructible)
              • Custom script: call RemoveLocation(udg_TimeWave_DummyLoc)
            • Else - Actions
              • Set TimeWave_Movement = (TimeWave_DummyLoc offset by 35.00 towards TimeWave_Angle degrees)
              • Unit - Move TimeWave_Dummy instantly to TimeWave_Movement
              • Set TimeWave_Distance = (TimeWave_Distance + 35.00)
              • Set TimeWave_UnitGroup = (Units within 350.00 of TimeWave_DummyLoc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and ((((Matching unit) belongs to an enemy of (Owner of TimeWave_Caster)) Equal to True) and ((
              • Unit Group - Pick every unit in TimeWave_UnitGroup and do (Actions)
                • Loop - Actions
                  • Unit - Kill (Picked unit)
                  • Set TimeWave_PickedUnitLoc = (Position of (Picked unit))
                  • Special Effect - Create a special effect at TimeWave_PickedUnitLoc using Abilities\Spells\Items\SpellShieldAmulet\SpellShieldCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_TimeWave_PickedUnitLoc)
              • Destructible - Pick every destructible within 350.00 of TimeWave_DummyLoc and do (Actions)
                • Loop - Actions
                  • Destructible - Kill (Picked destructible)
              • Custom script: call RemoveLocation(udg_TimeWave_DummyLoc)
              • Custom script: call RemoveLocation(udg_TimeWave_Movement)
              • Custom script: call DestroyGroup(udg_TimeWave_UnitGroup)
        • Else - Actions
          • Custom script: call RemoveLocation(udg_TimeWave_DummyLoc)
          • Trigger - Turn off (This trigger)


EDIT: Anyone noe hw to pick the unit, even if it has locust ability?? (+rep)
Thanks in Advance! :p
 

WilliamPa

Active Member
Reaction score
51
Code:
UnLocust
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Unit - Create 1 Fantassin for Player 1 (Red) at (Center of (Playable map area)) facing 0.00 degrees
        Unit - Hide (Last created unit)
        Custom script:    call UnitRemoveAbility(unit,'Aloc') //replace unit by the unit you want
        "Unit - Remove 'Aloc' (Locust - Unselectable) from (Last created unit)"
        Unit - Unhide (Last created unit)

This trigger is taken from 'Ability Guide' tutorial.

Replace unit by udg_LocustUnit(variable(name is just example)) and set it to the arrow before making it locust
 

popo80000

New Member
Reaction score
20
Code:
UnLocust
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Unit - Create 1 Fantassin for Player 1 (Red) at (Center of (Playable map area)) facing 0.00 degrees
        Unit - Hide (Last created unit)
        Custom script:    call UnitRemoveAbility(unit,'Aloc') //replace unit by the unit you want
        "Unit - Remove 'Aloc' (Locust - Unselectable) from (Last created unit)"
        Unit - Unhide (Last created unit)

This trigger is taken from 'Ability Guide' tutorial.

Replace unit by udg_LocustUnit(variable(name is just example)) and set it to the arrow before making it locust


EDIT: Thanks +rep!
Erm can uu explain again in a easier way?? i dont quite understand.. :(
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top