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

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