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

Damaging units in a line

Status
Not open for further replies.
Level 3
Joined
Jan 3, 2005
Messages
24
Ok, now this may seem like a simple question, but i have thought of ways to do this and cant figure out a proper way.

I want to make a Hero unit, charge through to the targeted point of cast(this i can do simply), whilst running through i want all units that he runs through to take damage, now i figure i can pick all units and have them take damage using a Timing interval of 0.01 seconds. PROBLEM - this means some units will be picked more than once.

I have thought i could pick every units within 100 range of the hero whilst charging and damage them, and then with the next 100 range check if any units picked are the same as the previous group and so on and so forth, this would only mean a large number of variables, unless of course i were to use arrays.

If anyone can show me any way JASS or no JASS on how to do this.

Obviously i can just create a unit to use shockwave or something, but i would prefer the damage to be based of the heros damage, which i can do, by checking its level, agility and items and auras, so yeah, just curious if there is a decent way to make this.
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
well, you could store the units hit in a group ( global ), and make sure the units are not in that group. at the end of the loop, it adds all the units from the previous group and all the damaged units into the same group

or you could have it do very low damage ( mbe something like .05 )
 
Status
Not open for further replies.
Top