HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Jass Help Im New

07-10-2004, 06:28 AM#1
Dark_Kagashin
ok im new to all this so if you could help me


how would i get all the points in a circle from a units location?
07-10-2004, 10:00 AM#2
PitzerMike
First off, you would never get all the points because the number of points is endless.
But here I'll create a sampe where you can choose the number of points yourself.

Code:
function DoThePointsThingy takes unit YourUnitHere, integer NrPoints, real Distance returns nothing
local location MyPoint = null
local real Angle = 360 / NrPoints
loop
  exitwhen NrPoints <= 0
  MyPoint = PolarProjectionBJ(GetUnitLoc(YourUnitHere),Distance,Angle*NrPoints)
  //do whatever you like with your point here
  set NrPoints = NrPoints - 1
endloop
call RemoveLocation(MyPoint)
set MyPoint = null
endfunction