I have a special spell that is instant cast and cause damage to a random unit in front of the caster at melee range but i have no idea how to detect the facing and position of a unit
Set PointA = Position of Triggering unit
Set Group = Units within 100 of PointA matching Matching unit is alive/an enemy of owner of triggering unit/otherconditions
Pick Every unit in Group and do multiple actions:
-Set PointB = Position of Picked Unit
-Angle from PointA to PointB is Greater than or equal to Facing of Triggering Unit-20
-Angle from PointA to PointB is Less than or equal to Facing of Triggering Unit+20
-call RemoveLocation (udg_PointB)
call DestroyGroup (udg_Group)
call RemoveLocation (udg_PointA)
I wanted to do similar spell. I did it similar to keychup but i got some problem, that when you attack the unit from above (go from above and use spell) then it wont work.
But it works if i go from sides/down
Keep in mind that the game is looking for an angle value, i.e. a real number between 0 and 360. If the facing angle of the triggering unit is less than (for the example) 20, or greater than 340, it may not be able to properly detect the entire damaging area.
For example, say the facing angle of the unit is 355 degrees, and the angle from the casting unit (PointA) to the target (PointB) is 10 degrees. The target should be hit, because the actual difference in angles is only 15 degrees, but it won't detect a hit because 10 isn't between 335 and 375.
To get around this, you can use the modulo function, with (Facing of Triggering Unit + 20) or (Facing of Triggering Unit + 340) as the dividend, and 360 as the divisor.
Where I live has a pool so we are using that to get water to flush the toilets. We have enough bottled water to drink and brush teeth and stuff but it has been a few days and no shower though....
That dude, Tom Boyd, is really upset about the backlash from his "it's your fault you're freezing" thing because he claims he resigned before saying it, so it wasn't like he said it in his official capacity or anything.