The search keyword must be a single word (no spaces).
Function MeleeClearExcessUnit
- Line
- 8468
- Location
- blizzard.j
- Constant?
- no
- Type
- function
- Arguments
- nothing
- Returns
- nothing
| 8468 | function MeleeClearExcessUnit takes nothing returns nothing |
| 8469 | local unit theUnit = GetEnumUnit() |
| 8470 | local integer owner = GetPlayerId(GetOwningPlayer(theUnit)) |
| 8471 | |
| 8472 | if (owner == PLAYER_NEUTRAL_AGGRESSIVE) then |
| 8473 | // Remove any Neutral Hostile units from the area.
|
| 8474 | call RemoveUnit(GetEnumUnit()) |
| 8475 | elseif (owner == PLAYER_NEUTRAL_PASSIVE) then |
| 8476 | // Remove non-structure Neutral Passive units from the area.
|
| 8477 | if not IsUnitType(theUnit, UNIT_TYPE_STRUCTURE) then |
| 8478 | call RemoveUnit(GetEnumUnit()) |
| 8479 | endif
|
| 8480 | endif
|
| 8481 | endfunction
|