• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Pick units

Status
Not open for further replies.
First of, if you don't save the target point in variable and then you don't use the point variable in the line you posted, you will leak that location.

Second - why don't you use "Unit in range" option instead of "Unit in region" when picking units? Makes more sense and it doesn't have to use any dynamically created regions.
 
  • Wait 0.10 game-time seconds
You can't use a wait action in a loop like that.

Oh.

so how to add delay?

  • Unit Group - Pick every unit it Ranage (510) from (Target of Ability being cast))
    • Actions
      • Unit - Create 1 (Caster) for (Owner of (Casting Unit) at (Position of (Casting Unit)
      • Unit - Add (Death Coil) to (Last Created Unit)
      • Unit - Order (Last Created Unit) to (Undead - Death Coil) targeting (Picked Unit)
      • Wait - Delay
 
Well, it will get a lot more complicated. You need to use timers and dynamic indexing.

What effect are you trying to achieve? The way I see it now is:

- unit casts aoe spell
- effected enemies are death coiled 1 by 1, randomly

What's wrong with having them all death coiled at the same time? Not saying you have to do this, just trying to find the easiest way.
 
If you're up for it, you can do it. Here's a tutorial on indexing:

https://www.hiveworkshop.com/forums...-gui-user-should-know-233242/#Section 2 Ch 12

So you basically have 2 triggers. The first trigger is run when the unit cast's the spell "starts the effect of an ability". That's where you set all the variables for the spell, like damage, time, etc.

The 2nd trigger is the timer. It runs periodically and is turned on the by first trigger. This trig does all the actions for the spell, by reading all the variables set in the first trigger.

The tutorial shows you how to set up the indexing so that the spell is multi-unit instance, or MUI. That's why you can't use a 'wait' action in your original spell, because the variables won't be saved after the wait has ended, which is why it needs to be done with 2 triggers, and indexing.
 
  • Unit Group - Pick every unit it Ranage (510) from (Target of Ability being cast))
    • Actions
      • Unit - Create 1 (Caster) for (Owner of (Casting Unit) at (Position of (Casting Unit)
      • Unit - Add (Death Coil) to (Last Created Unit)
      • Unit - Order (Last Created Unit) to (Undead - Death Coil) targeting (Picked Unit)
      • Wait - Delay

Now it looks like this:
  • Set tmp_casting = Casting Unit
  • Unit Group - Pick every unit it Ranage (510) from (Target of Ability being cast))
    • Actions
      • Unit - Create 1 (Caster) for (Owner of (Casting Unit) at (Position of (tmp_casting)
      • Set tmp_caster = Last Created Unit
      • Unit - Add (Death Coil) to (tmp_caster)
      • Unit - Order (tmp_caster) to (Undead - Death Coil) targeting (Picked Unit)
 
Status
Not open for further replies.
Back
Top