• 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.

Secondary effect of a spell

Status
Not open for further replies.
Level 1
Joined
Feb 1, 2005
Messages
3
My knowledge of triggers is rather low, so I need the help of an expert to resolve a little problem with a spell, which should be quite easy.

When a spell is being cast (ex:slow) I need that all allied units in a range of 800 of the target begin attacking it.

Can anyone show me the trigger which I need to create?

Thanks a lot
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Ok... this is very simple. You just need to make an unit have the ability. I will call it let's say Magical Taunt. And now, for the triggers:

Event - An Unit Starts the Effect of an ability
Actions - Create one dummy unit at (Position of (Casting Unit)) for (Owner of (Casting Unit))
- Pick Up Every Unit within 800 of (Position of (Casting Unit)) matching conditions ((Matching Unit) belongs to an enemy of (Owner of(Casting Unit))) equal to true) and do (Actions)
- Order (Picked Unit) to Attack (Casting Unit)

That is all... No Taunt necessary.
 
Level 1
Joined
Feb 1, 2005
Messages
3
Well thank you very much for your prompt reply, very kind of you.

But probably I haven't been so much clear in my exposition of the problem.

I try to explain it in the best way:

My hero is fighting alongside some allied troops (owned by the computer), an hero of an enemy player is approaching and so I want to cast on him my spell (Slow). After I have cast the spell on him, I need that (as second effect) all of my allied troops in range of 800 of him begin to attack this enemy hero.
I've used an hero as target but could be any other unit.
That's all!

May be you have already given me the solution with your answer, but I am not sure.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
If you want a CERTAIN unit (put on the map or placed into a variable) you can just change the event to (Unit (x) starts the effect of an ability), where x is the name of the variable or the name of the unit on the map. Select it of course! And if you want this to happen only when the unit casts slow, put as a condition (Ability Being Cast) equal to (Slow). The rest of the actions go accordingly!

~Daelin
 
Status
Not open for further replies.
Top