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

How can I make a unit do an attack that dmgs the enemies infront of him

Status
Not open for further replies.
Level 7
Joined
Oct 8, 2008
Messages
200
Basically am wondering how can I make a unit attack whatevers infront of him regardless if theres a target infront of him. Am not asking for a script itself am just asking for an example so I can branch out from that.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Pick all the units in the radius of attack, let's say 100 in this case.
From this group you will filter all the units that are not within the facing angle of your unit + something and the facing angle of your unit - something.

For example, if you want to be able to attack all the units like this \./ (the dot being the attacker), you will filter all the units that are not within facing angle + 35 and facing angle - 35.
 
Level 9
Joined
Jan 14, 2008
Messages
366
just display the attack animation upon command, and have the deal "damage area" infront of him. to determine the point you have to use point in radius of unit with z-offset towards unit facing angle.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Pick all the units in the radius of attack, let's say 100 in this case.
From this group you will filter all the units that are not within the facing angle of your unit + something and the facing angle of your unit - something.

For example, if you want to be able to attack all the units like this \./ (the dot being the attacker), you will filter all the units that are not within facing angle + 35 and facing angle - 35.

This is where +/- 35 are from the facing angle of the unit. Keep in mind to add that in that command :wink:
 
Status
Not open for further replies.
Top