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

Problem with pick every unit...

Status
Not open for further replies.
Level 4
Joined
Apr 5, 2008
Messages
70
I've tried to make a spell that damaged all oponent units in 300 around the casting unit. So I made a Trigger witch works every time the unit cast the spell.
I made the Trigger
  • Unitgroup - pick every unit in 300 around the casting unit and do actions
    • if unit owned by playerx do (Couse (unit) to damage (picked unit), dealing (6*level of ability) damage of attacktype spell and damagetype normal
And everytime I tried it the game out automatick. Then i tried it with damage in area and set it so 20 and the same happens. Then i've tried it with an variable for "6*level of ability" at both, but the same happens. I hope someone can help me.
 
Level 4
Joined
Apr 5, 2008
Messages
70
Yes and yes

Thats an good idea, but what should I set the matching condition?
(owner of ( ? unit) equil player 1)
It isn't picket yet and triggered unit is at this moment the caster.

Edit: I've tasted it with picked unit and nothing happend and with triggered unit it crashed.
 
Last edited:
Level 4
Joined
Apr 5, 2008
Messages
70
I've found a way to solf the problem with the crash (I've add only a wait 0.01 seconds), but now I have a new problem.
The Trigger makes damage what starts the trigger from new. Then it's endless.
I need a condition what see which unit makes the damage and one that see which damage typ it is.
 
Level 12
Joined
Aug 22, 2008
Messages
911
The correct functioning of the spell would be to make the action like this:
  • Actions
    • Unit Group - Pick every unit in (Units within 300.00 of (Casting Unit) matching (Owner of (Matching Unit) is an enemy of (Owner of (Casting Unit)) equal to true)) and do (Multiple Actions)
      • Actions
        • Unit - Cause (Casting Unit) to damage (Picked Unit), dealing X damage of type X
        • -------- Blablabla --------
The function you made terminates when even one of the units within the casting unit is an ally or neutral.
The looping is probably a result of wrong events, please post them.
 
Status
Not open for further replies.
Top