Tinki3
Special Member
- Reaction score
- 418
Code:
call CreateUnit(GetOwningPlayer(u), GetUnitTypeID(u), udg_Creep_Location[GetRandomInt(1, 9)])
Can anyone help me fix?
call CreateUnit(GetOwningPlayer(u), GetUnitTypeID(u), udg_Creep_Location[GetRandomInt(1, 9)])
No, I know what they do, I was just wondering what I did/typed wrong.Just a question, are you guessing what those functions need or do???
Uh you don't need LastCreatedUnit if you're using CreateUnit. LastCreatedUnit is simply a global variable and it exists so that you could somehow refer to the unit in GUI.I find it better to use CreateNUnitsAtLoc(), because GetLastCreatedUnit() dosen't seem to work with CreateUnit(). (At least for me.)
local unit u = CreateUnit(Player(0),'A000',0.00,0.00,359.99)
local unit u = CreateUnitAtLoc(Player(0),'A000',Location(0.00,0.00),359.99)
local unit u = CreateUnitAtLocByName(Player(0),"Tauren",Location(0.00,0.00),359.99)
local unit u
call CreateUnitAtLocSaveLast(Player(0),'ugol',Location(0.00,0.00),359.99)
set u = bj_lastCreatedUnit
[B]//or simply[/B]
local unit u = CreateUnitAtLocSaveLast(Player(0),'ugol',Location(0.00,0.00),359.99)
local unit u = CreateUnitByName(Player(0),"Priest",0.00,0.00,359.99)
local unitpool up = CreateUnitPool
local unit u = UnitPoolAddUnitType(up,'A000',25.00) [B]//25.00 = Weight of 100.00, up = unitpool, 'A000' = UnitId[/B]
call UnitPoolRemoveUnitType(up,'A000') [B]Removes the unitId 'A000' from the unitpool up[/B]
call DestroyUnitPool(up)