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

[Trigger] Need some help

Status
Not open for further replies.
Level 5
Joined
Oct 18, 2007
Messages
139
So yea, I'm trying to pull my weight on the map me and my friend have been working on, but I'm not exactly as good with triggers as he is.

So heres the thing, I made a trigger that if a unit has the chakra flow buff on them, they can create shadow clone units when ever they click an area for a few seconds. That worked out fine and doesn't seem to be messed up but, is there any way to make the created units use a spell on the nearest enemy unit o-o? I've been trying for a while now and can't get it working.

  • Shadow Clone Spawn
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • ((Ordered unit) has buff Chakra Flow ) Equal to True
      • (Distance between (Position of (Ordered unit)) and (Target point of issued order)) Less than or equal to 10000.00
    • Actions
      • Unit - Create 1 Shadow Clone for (Owner of (Triggering unit)) at (Target point of issued order) facing Default building facing (270.0) degrees
      • Special Effect - Create a special effect attached to the origin of (Last created unit) using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
If anyone could help me it would be a big help
 
Level 3
Joined
Nov 11, 2007
Messages
39
Add a trigger simmilar to this. Warning: Not checked for leaks.

  • Test
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to YourUnit
    • Actions
      • Set PossibleTargets(UnitgroupVariable) = (Units within 512.00 of (Position of (Triggering unit)) matching (((Triggering unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
      • Set Target(UnitVariable) = (Random unit from Player10UnitGroup)
      • Unit - Order (Triggering unit) to Attack Target(UnitVariable)
 
Status
Not open for further replies.
Top