• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to damage units in a line through trigger(GUI)?

Status
Not open for further replies.
Level 5
Joined
Jan 23, 2014
Messages
152
What's the most efficient way? I need to trigger the damage because it depends on the unit's attribute
 
The most efficient way would be to pick units in a rectangle coming from the hero, but this will make the damage instant which you might not want if you're using a projectile.

A simpler method would be to spawn a dummy unit for the projectile, and use a looping trigger to move it forwards and damage units around it. After a unit has been damaged, add it to a unit group so that it won't be damaged again by this instance.
 
Level 5
Joined
Jan 23, 2014
Messages
152
Ohh I also thought of doing the simpler method you mentioned. But wont it cause lag because it uses 2 unit groups and it loops every x seconds?


Just out of curiosity, how do you do the rectangle method?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
That method is fine, you can also create a dummy unit, order dummy unit to cast a carrion swarm, when a unit takes damage and if damager unit is carrion dummy also deal your damage based on attribute.
 
Status
Not open for further replies.
Top