| 02-18-2008, 11:25 PM | #1 |
Title pretty much covers it. |
| 02-18-2008, 11:53 PM | #2 |
no it doesnt, wat do u mean by find |
| 02-18-2008, 11:54 PM | #3 |
You know how JASS:GroupEnumUnitsInRange |
| 02-19-2008, 02:19 AM | #4 |
You just have to filter them like so: JASS:library EnumInFront globals private real X1 private real Y1 private real AnglePlus private real AngleMinus private group Group endglobals private function Enum takes nothing returns nothing local unit U = GetEnumUnit() local real X2 = GetUnitX(U) local real Y2 = GetUnitY(U) local real Angle = Atan2(Y2-Y1, X2-X1)*57.2957 if Angle < 0.00 then set Angle = Angle+360.00 endif if (Angle>AnglePlus and Angle<AngleMinus) then call GroupRemoveUnit(Group, U) endif endfunction function GroupEnumInFrontOfUnit takes group G, unit U, real Radius, real Angle, boolexpr Filter returns nothing local real Facing = GetUnitFacing(U) set AnglePlus = Facing+Angle/2 set AngleMinus = Facing-Angle/2 if AngleMinus < 0.00 then set AngleMinus = AngleMinus+360.00 endif set X1 = GetUnitX(U) set Y1 = GetUnitY(U) set Group = G call GroupEnumUnitsInRange(G, X1, Y1, Radius, Filter) call ForGroup(G, function Enum) endfunction endlibrary |
| 02-19-2008, 10:32 AM | #5 |
*twitches* Pyrogasm... vJass? Unless my one month absence made me miss something, Pyrogasm + vJass = syntax error or somethin'... |
| 02-19-2008, 01:19 PM | #6 |
then u should say: pick every unit in front of unit... not find... find is mroe like searching, but for wat. Also in front means with how much angle variation ... |
| 02-19-2008, 05:03 PM | #7 |
I write vJASS for people... I even compile it manually :P |
