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

Can someone help me get this to work?

Status
Not open for further replies.
This trigger is meant to shoot chain lightning at a random unit near the hero.. and it does that to every unit near the hero but it doesn't hit a unit more than once with it.. for some reason it hits the same unit as well as others.. it wont remove the unit it hits from the unit group.. here are my triggers..

  • Casting Lightning Fury
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Fury
    • Actions
      • Set Caster[(Player number of (Owner of (Casting unit)))] = (Casting unit)
      • Set Targets = (Units within 500.00 of (Position of Caster[(Player number of (Owner of (Casting unit)))]) matching (((Owner of (Matching unit)) is an enemy of (Owner of Caster[(Player number of (Owner of (Casting unit)))])) Equal to True))
      • Set CastingTime = (Number of units in Targets)
      • Trigger - Turn on Lightning Fury Effect <gen>
      • Wait until (CastingTime Equal to 0), checking every 0.50 seconds
      • Trigger - Turn off Lightning Fury Effect <gen>
  • Lightning Fury Effect(Initially Off)
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 LightningCastingDumy for (Owner of Caster[(Player number of (Owner of (Casting unit)))]) at (Position of Caster[(Player number of (Owner of (Casting unit)))]) facing Default building facing degrees
      • Unit - Add a 0.75 second Generic expiration timer to (Last created unit)
      • Unit - Add Lightning to (Last created unit)
      • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Random unit from Targets)
      • Unit Group - Remove (Target unit of ability being cast) from Targets
      • Unit - Remove Lightning from (Last created unit)
 
Level 3
Joined
Feb 9, 2008
Messages
21
First of all your spell leaks but your proabably know that, secondly you wanna use this matching:

  • Set UnitGroup = (Units within 500.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
 
Level 3
Joined
Feb 9, 2008
Messages
21
Just change the "Triggering unit" to your "(Owner of Caster[(Player number of (Owner of (Casting unit)))])", and asfar as i can see it does leak the position "(Position of Caster[(Player number of (Owner of (Casting unit)))])"
 
Status
Not open for further replies.
Top