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.
It'll be good practice at least, I did a bunch of practice boards the last few weeks but that's a bit different than actual repair. It's pretty obvious what's going on with those, so it's not very hard to trace the leads, and they aren't designed with faults so
Site is peaking on traffic for the recipes - Sundays are always the big days and we are 200 plus unique visitors an hour right now and it will be like that probably be around 3000 total on the site all day maybe more if Google desires it LOL
Anyway I have a power bench that I don't actually know how to use, but I'm assuming I can take the battery out and power it directly from that to see if any of them turn on.
If you had kids like me that grew up in that era you could just go to your closet and fish out one of the cords from the cord bag. I bet I have everyone of those cord connectors plus some