staind25
TH.net Regular
- Reaction score
- 7
I'm using triggers to try to create a "cone" of damage in front of the caster, much like "Cone of Cold" in World of Warcraft (I don't think such a thing exists in WC3...if it does, please let me know).
Anyways, it's pretty easy to cause damage in a rectangular region, but how do I go about doing a cone? I've tried a ton of different things and can't get it. Basically, I'm using Temp variables, then using a "Pick every unit in region..." etc and dealing damage to that region.
Here are some examples of what I've tried:
Points (Both are used):
For TempPoint2, my idea was to create a point at a 45 degree angle away from the caster, then from this point, create a region that goes from the point, to the caster, and then to another point...something that would look like this:
*--------*
.. \ ..... /
.... (c)
With (c) being the caster, the left * being TempPoint2, the lines showing the approximate edge of the region, and the right * being a corner of the region (The periods were used to allow for spacing...without them, the other characters wouldn't space over).
Regions (Only need one, but each goes about creating the region in a different way...neither worked that well):
For the last region, that's the first time I've used the coordinates, so maybe I'm not using it correctly. See my terrible drawing above for a little more clarity in what I'd like, and maybe you could help me get the coords correct
And, just for additional clarity, here's where the "Damage" comes from:
This problem is difficult to describe, so I apologize if I wasn't clear enough...but let me know if you have any questions.
Thanks for your time!
Anyways, it's pretty easy to cause damage in a rectangular region, but how do I go about doing a cone? I've tried a ton of different things and can't get it. Basically, I'm using Temp variables, then using a "Pick every unit in region..." etc and dealing damage to that region.
Here are some examples of what I've tried:
Points (Both are used):
Trigger:
- Set TempPoint = (Position of (Triggering unit))
- Set TempPoint2 = (TempPoint offset by 200.00 towards ((Facing of (Triggering unit)) + 45.00) degrees)
For TempPoint2, my idea was to create a point at a 45 degree angle away from the caster, then from this point, create a region that goes from the point, to the caster, and then to another point...something that would look like this:
*--------*
.. \ ..... /
.... (c)
With (c) being the caster, the left * being TempPoint2, the lines showing the approximate edge of the region, and the right * being a corner of the region (The periods were used to allow for spacing...without them, the other characters wouldn't space over).
Regions (Only need one, but each goes about creating the region in a different way...neither worked that well):
Trigger:
- Set TempRegion = (Region centered at TempPoint2 with size (550.00, 400.00))
Trigger:
- Set TempRegion = (Region((X of TempPoint2), 0.00, (X of TempPoint), ((Y of TempPoint2) + 90.00)))
For the last region, that's the first time I've used the coordinates, so maybe I'm not using it correctly. See my terrible drawing above for a little more clarity in what I'd like, and maybe you could help me get the coords correct
And, just for additional clarity, here's where the "Damage" comes from:
Trigger:
- Unit Group - Pick every unit in (Units in TempRegion matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) or (((Matching unit) belongs to an ally and do (Actions)
- Loop - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing 800.00 damage of attack type Spells and damage type Cold
- Loop - Actions
This problem is difficult to describe, so I apologize if I wasn't clear enough...but let me know if you have any questions.
Thanks for your time!