- Joined
- Sep 26, 2009
- Messages
- 9,534
This is my first textmacro:
Calling it like this:
Am I doing it right?
JASS:
//! textmacro Multi takes count, id, x, y, rndX, rndY
set i = $count$
set cx = $x$
set cy = $y$
loop
if(not($rndX$ == 0. and $rndY$ == 0.))then
set cx = GetRandomReal($x$,$rndX$)
set cy = GetRandomReal($y$,$rndY$)
endif
call CreateUnit(BAD,$id$,cx,cy,GetRandomReal(0.,360.))
set i = i - 1
exitwhen(i == 0)
endloop
//! endtextmacro
Calling it like this:
JASS:
function somefunction takes nothing returns nothing
local integer i
local real cx
local real cy
//! runtextmacro Multi ("rand1","5","'nspp'","-5776.","-1952.","0.","0.")
endfunction
Am I doing it right?
Last edited: