If you wanted to make a system for it you could.
Find X unit's degree from Y unit.
But without extensive triggering, not really.
You could just make it so that a dummy unit fires a shockwave kind of thing in the facing o 0 90 180 n' 270 whenever it sees a unit and from whichever way is closer (enemy unit at 44 degree with tower as base, tower dummy shoots at 0)
This is just brainstorming though.
Actually, they do. I've used degrees at +500 and still got it to work as it's supposed to.Still hard to do, back to what I said, blizzard doesnt think "359 + 15 (374)" as 14 degrees.
Actually, they do. I've used degrees at +500 and still got it to work as it's supposed to.
Really?
Oh ok fair enough.
Trigger:
- Trigger
- Events
- Unit - A unit is Attacked
- Conditions
- Or - Any Conditions are true
- Any - Conditions
- Unit - Type of (Attacking Unit) is equal to Cannon Tower
- Actions
- Set Temp_Restriction = (THE ONLY ANGLE WHICH THE UNIT CAN SHOOT)
- Set Temp_Point = (Position of (Triggering Unit))
- Set Temp_Point_2 = (Position of (Attacking Unit))
- Set Temp_Real = Angle between Temp_Point and Temp_Point_2
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Temp Real Is Greater than (>) Temp_Restriction - 15.00
- Temp Real Is Less than (<) Temp_Restriction + 15.00
- Then - Actions
- -----Nothing I guess-----
- Else - Actions
- Unit - Order (Attacking Unit) to stop
- Custom Script: call RemoveLocation (udg_Temp_Point)
- Custom Script: call RemoveLocation (udg_Temp_Point_2)
That'd lag bad. Real bad.
You're ordering the unit to stop. Whats the unit going to do? Stop. What's it going to do then? Attack the nearest thing, as its meant to in WC3.
Do this with 6 units and some may begin to feel it. Do this with more units and it's going to lag a lot more. I don't know what WC3's Ordering system's refresh rate is though.
Not that one. It may be easier just to order the buildings via Pick every enemy within X range of building and have that building attack that unit (building having Worker classification so not to auto-attack, that is if buildings can have that classification and still follow it).
Or have an ability that does the damage for the building if that doesn't work. Or trigger the damage. The first idea I said in this post would be the best though.