I just started learning JASS, and wanted to do a simple function for a spell I was making
I do not have JassCraft (using a computer that isn't mine), so I need to know the proper syntax for this code
I'm not sure exactly what the syntax is, but I assume it is something similar to that
Also, I haven't added a bit for making the unit face the center (not sure wah tthe syntax is) but I imagine it's just setting unit facing = to D - 180
If somebody could also tell me the syntax for changing their facing that would be good too
(I will give +rep)
I do not have JassCraft (using a computer that isn't mine), so I need to know the proper syntax for this code
JASS:
function Swarm takes real x, real y, real r, integer n, unit-type unit returns nothing
local real DegreesBetween = 360/n
local real D = 0
loop
exitwhen n==0
D = D + DistanceBetween
CreateUnit(x + (cos(D) * r), y + (sin(D) * r), unit)
n = n -1
endloop
endfunction
I'm not sure exactly what the syntax is, but I assume it is something similar to that
Also, I haven't added a bit for making the unit face the center (not sure wah tthe syntax is) but I imagine it's just setting unit facing = to D - 180
If somebody could also tell me the syntax for changing their facing that would be good too
(I will give +rep)