• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Pick every unit in aoe of X ability and do actions

Status
Not open for further replies.
Level 3
Joined
Mar 6, 2011
Messages
26
Hi! I used to know how to do this, but somehow I've forgotten it. Can you tell me what's wrong with this?


  • X ability
    • Events
      • Unidad - Unit starts the effect of an ability
    • Conditions
      • (Ability being cast) equals to X ability
    • Actions
      • Set Ab_Temp_Point = (Target point of ability being cast)
      • Set Ab_Temp_Group = (Units within 300.00 of Temp_Point matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Igual a True))
      • Unit Group - Pick every unit in Ab_Temp_Group and do (Actions)
        • Loop: Actions
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Ab_Temp_Point facing Vista edificio predeterminada degrees
          • Unidad - Add X ability Dummy 2 to (Last created unit)
          • Unidad - Add a 3.00 second expiration timer to (Last created unit)
          • Unidad - Order (Last created unit) to Drunken Browler neutral - Drunken Haze (Picked unit)
      • Custom script: call RemoveLocation (udg_Ab_Temp_Point)
      • Custom script: call DestroyGroup (udg_Ab_Temp_Group)
As you can, I want the units in the aoe to have the buff Drunken haze. Nothing else to say, Thanks in advance.
 
Level 5
Joined
Sep 1, 2010
Messages
168
Seems ok to me so far - maybe you simply have forgotten to set the mana cost of your ability to 0 and your dummy units don't have any :)
Or that drunken haze originally is a hero ability.
Or you've set your casting range too short.

Anyways, test map attached.
 

Attachments

  • drunken haze AOE.w3x
    15.1 KB · Views: 55
Level 14
Joined
Aug 30, 2004
Messages
909
As a side note, 3 seconds is a long time for the dummy unit to live; i'd make it 1 or 2 unless there's a cast time for the spell

Also, if you give the dummy unit the ability in advance you won't have to add the ability in the trigger.

Also make sure the ability effects the right targets.
 
Level 3
Joined
Mar 6, 2011
Messages
26
Thaks for your answers and your time. But the problem was this:

Set Ab_Temp_Group = (Units within 300.00 of Temp_Point matching (((Owner of (Matching unit)) is an enemy of (Owner of (Triggering unit))) Igual a True))

It should be "Ab_Temp_Point." That's why the dummy unit wasn't created.
Again, thanks for your answers and your time. I'll be more careful next time.
 
Status
Not open for further replies.
Top