• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Kill every unit of type X when enters grass

Status
Not open for further replies.
Level 4
Joined
Apr 26, 2011
Messages
65
check it guys:

Any footman enters dark grass -> add 50% bonus (only) to him
if he leaves dark grass, remove bonus movement speed from him

can u tell me how can i trigger that ??!
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
For the event, you can either cover any dark grass location in a region and use the TriggerRegisterEnterRegion event or you periodically check whether the terrain type beneath a unit's feet is equal to the dark grass type. Do you also have problems with applying the buff? How about a command aura that only targets self for example.
 
Level 4
Joined
Apr 26, 2011
Messages
65
i can make a simple test map for you
please do, i'm lil bit confused
BTW: effect of trigger shouldn't work for all units of unit type around map. just for single unit of unit type... hope you understand me, too hard to write that :p
 
Use the same trigger like in my test map above, but just change actions:

  • creep
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is dead) Equal to False) and ((Unit-type of (Matching unit)) Equal to yourunit))) and do (Actions)
        • Loop - Actions
          • Set Temp_point = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain type at Temp_point) Equal to YourTerrainType
            • Then - Actions
              • Unit - Remove YourAbility from (Picked unit)
          • Custom script: call RemoveLocation (udg_Temp_point)
 
Status
Not open for further replies.
Top