- Joined
- Jul 17, 2013
- Messages
- 544
Hi i have two question frist is whats that function and what does it do? i found it in my map idk if me did it by mistake or my friendfunction CreateUnitsInRectRandom takes player id, integer unitid, rect whichRect, integer number returns nothing
local integer i = 0
loop
exitwhen i == number
call CreateUnit(id, unitid,GetRandomReal(GetRectMinX(whichRect), GetRectMaxX(whichRect)), GetRandomReal(GetRectMinY(whichRect), GetRectMaxY(whichRect)), GetRandomDirectionDeg())
set i = i + 1
endloop
endfunction
my second question is are those triggers fine? do they leak
local integer i = 0
loop
exitwhen i == number
call CreateUnit(id, unitid,GetRandomReal(GetRectMinX(whichRect), GetRectMaxX(whichRect)), GetRandomReal(GetRectMinY(whichRect), GetRectMaxY(whichRect)), GetRandomDirectionDeg())
set i = i + 1
endloop
endfunction
my second question is are those triggers fine? do they leak
-
Untitled Trigger 002
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Give Tribute (hotkey y)
-
(Unit-type of (Target unit of ability being cast)) Equal to TradePort
-
-
Actions
-
Unit - Remove (Triggering unit) from the game
-
Player - Add 600 to (Owner of (Target unit of ability being cast)) Current gold
-
-
-
Untitled Trigger 002 Copy
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Give gold (hotkey y)
-
(Unit-type of (Target unit of ability being cast)) Equal to TradeCenter
-
-
Actions
-
Unit - Remove (Triggering unit) from the game
-
Player - Add 500 to (Owner of (Target unit of ability being cast)) Current gold
-
-