• 🏆 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!

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