Class: Unit#
Hierarchy#
↳ Unit
Constructors#
constructor#
new Unit(owner: number | MapPlayer, unitId: number, x: number, y: number, face: number, skinId?: number): UnitCreates a unit.
Parameters:#
| Name | Type | Description |
|---|---|---|
owner | number | MapPlayer | The owner of the unit. |
unitId | number | The rawcode of the unit. |
x | number | The x-coordinate of the unit. |
y | number | The y-coordinate of the unit. |
face | number | The direction that the unit will be facing in degrees. |
skinId? | number | The skin of the unit. |
Returns: Unit
Defined in: handles/unit.ts:15
Properties#
handle#
• Readonly handle: unit
Defined in: handles/unit.ts:15
Accessors#
acquireRange#
acquireRange(): numberSets a unit's acquire range. This is the value that a unit uses to choose targets to engage with. Note that this is not the attack range. When acquisition range is greater than attack range, the unit will attempt to move towards acquired targets, and then attack. Setting acquisition range lower than attack range in the object editor limits the unit's attack range to the acquisition range, but changing a unit's acquisition range with this native does not change its attack range, nor the value displayed in the UI.
Returns: number
Defined in: handles/unit.ts:49
acquireRange(value: number): voidSets a unit's acquire range. This is the value that a unit uses to choose targets to engage with. Note that this is not the attack range. When acquisition range is greater than attack range, the unit will attempt to move towards acquired targets, and then attack. Setting acquisition range lower than attack range in the object editor limits the unit's attack range to the acquisition range, but changing a unit's acquisition range with this native does not change its attack range, nor the value displayed in the UI.
note It is a myth that reducing acquire range with this native can limit a unit's attack range.
Parameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:45
agility#
agility(): numberReturns: number
Defined in: handles/unit.ts:53
agility(value: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:57
armor#
armor(): numberReturns: number
Defined in: handles/unit.ts:61
armor(armorAmount: number): voidParameters:#
| Name | Type |
|---|---|
armorAmount | number |
Returns: void
Defined in: handles/unit.ts:65
canSleep#
canSleep(): booleanReturns: boolean
Defined in: handles/unit.ts:73
canSleep(flag: boolean): voidParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:69
collisionSize#
collisionSize(): numberReturns: number
Defined in: handles/unit.ts:77
color#
color(whichColor: playercolor): voidParameters:#
| Name | Type |
|---|---|
whichColor | playercolor |
Returns: void
Defined in: handles/unit.ts:81
currentOrder#
currentOrder(): numberReturns: number
Defined in: handles/unit.ts:85
defaultAcquireRange#
defaultAcquireRange(): numberReturns: number
Defined in: handles/unit.ts:89
defaultFlyHeight#
defaultFlyHeight(): numberReturns: number
Defined in: handles/unit.ts:93
defaultMoveSpeed#
defaultMoveSpeed(): numberReturns: number
Defined in: handles/unit.ts:97
defaultPropWindow#
defaultPropWindow(): numberReturns a unit's default propulsion window angle in degrees.
note This function is the odd case in the asymmetric prop window API, since the
other prop window natives use radians.
Returns: number
Defined in: handles/unit.ts:106
defaultTurnSpeed#
defaultTurnSpeed(): numberReturns: number
Defined in: handles/unit.ts:110
experience#
experience(): numberReturns: number
Defined in: handles/unit.ts:114
experience(newXpVal: number): voidParameters:#
| Name | Type |
|---|---|
newXpVal | number |
Returns: void
Defined in: handles/unit.ts:118
facing#
facing(): numberReturns: number
The units facing in degrees.
Defined in: handles/unit.ts:129
facing(value: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:122
foodMade#
foodMade(): numberReturns: number
Defined in: handles/unit.ts:133
foodUsed#
foodUsed(): numberReturns: number
Defined in: handles/unit.ts:137
id#
id(): numberGet the unique ID of the handle. The ID is recycled once you destroy the object.
Returns: number
The unique ID of a handle object.
Defined in: handles/handle.ts:18
ignoreAlarmToggled#
ignoreAlarmToggled(): booleanReturns: boolean
Defined in: handles/unit.ts:141
intelligence#
intelligence(): numberReturns: number
Defined in: handles/unit.ts:145
intelligence(value: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:149
inventorySize#
inventorySize(): numberReturns: number
Defined in: handles/unit.ts:153
invulnerable#
invulnerable(): booleanRenders a unit invulnerable/lifts that specific invulnerability.
Returns: boolean
Defined in: handles/unit.ts:167
invulnerable(flag: boolean): voidRenders a unit invulnerable/lifts that specific invulnerability.
note The native seems to employ the 'Avul' ability, which is defined in the default AbilityData.slk.
If there is no 'Avul' defined, this will crash the game.
Parameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:163
level#
level(): numberReturns: number
Defined in: handles/unit.ts:171
life#
life(): numberGet the Widget's life.
Returns: number
Defined in: handles/widget.ts:9
life(value: number): voidSet the Widget's life.
Parameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/widget.ts:16
localZ#
localZ(): numberReturns: number
Defined in: handles/unit.ts:175
mana#
mana(): numberReturns: number
Defined in: handles/unit.ts:179
mana(value: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:183
maxLife#
maxLife(): numberReturns: number
Defined in: handles/unit.ts:187
maxLife(value: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:191
maxMana#
maxMana(): numberReturns: number
Defined in: handles/unit.ts:195
maxMana(value: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:199
moveSpeed#
moveSpeed(): numberReturns: number
Defined in: handles/unit.ts:207
moveSpeed(value: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:203
name#
name(): stringasync
Returns: string
Defined in: handles/unit.ts:214
name(value: string): voidParameters:#
| Name | Type |
|---|---|
value | string |
Returns: void
Defined in: handles/unit.ts:218
nameProper#
nameProper(): stringReturns the hero's "Proper Name", which is the name displayed above the level bar.
note Will return 'null' on non-hero units.
Returns: string
Defined in: handles/unit.ts:231
nameProper(value: string): voidParameters:#
| Name | Type |
|---|---|
value | string |
Returns: void
Defined in: handles/unit.ts:222
owner#
owner(): MapPlayerReturns: MapPlayer
Defined in: handles/unit.ts:239
owner(whichPlayer: MapPlayer): voidParameters:#
| Name | Type |
|---|---|
whichPlayer | MapPlayer |
Returns: void
Defined in: handles/unit.ts:235
paused#
paused(): booleanPauses a unit. A paused unit has the following properties:
- Buffs/effects are suspended
- Orders are stored when paused and fired on unpause
- The paused unit does not accept powerups.
addItemreturns true but the item is not picked up
Returns: boolean
true if the unit is paused
Defined in: handles/unit.ts:256
paused(flag: boolean): voidPauses a unit. A paused unit has the following properties:
- Buffs/effects are suspended
- Orders are stored when paused and fired on unpause
- The paused unit does not accept powerups.
addItemreturns true but the item is not picked up
Parameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:249
point#
point(): Pointbug If the unit is loaded into a zeppelin this will not return the position
of the zeppelin but the last position of the unit before it was loaded into
the zeppelin.
Returns: Point
Defined in: handles/unit.ts:265
point(whichPoint: Point): voidParameters:#
| Name | Type |
|---|---|
whichPoint | Point |
Returns: void
Defined in: handles/unit.ts:269
pointValue#
pointValue(): numberReturns: number
Defined in: handles/unit.ts:273
propWindow#
propWindow(): numberReturns a unit's propulsion window angle in radians.
http://www.hiveworkshop.com/forums/2391397-post20.html
Returns: number
Defined in: handles/unit.ts:298
propWindow(newPropWindowAngle: number): voidSets a unit's propulsion window to the specified angle (in radians). The propulsion window determines at which facing angle difference to the target command's location (move, attack, patrol, smart) a unit will begin to move if movement is required to fulfil the command, or if it will turn without movement. A propulsion window of 0 makes the unit unable to move at all. A propulsion window of 180 will force it to start moving as soon as the command is given (if movement is required). In practice, this means that setting a unit's prop window to 0 will prevent it from attacking.
http://www.hiveworkshop.com/forums/2391397-post20.html
Parameters:#
| Name | Type | Description |
|---|---|---|
newPropWindowAngle | number | The propulsion window angle to assign. Should be in radians. |
Returns: void
Defined in: handles/unit.ts:291
race#
race(): raceReturns: race
Defined in: handles/unit.ts:302
rallyDestructable#
rallyDestructable(): DestructableReturns: Destructable
Defined in: handles/unit.ts:306
rallyPoint#
rallyPoint(): PointReturns: Point
Defined in: handles/unit.ts:310
rallyUnit#
rallyUnit(): UnitReturns: Unit
Defined in: handles/unit.ts:314
resourceAmount#
resourceAmount(): numberReturns: number
Defined in: handles/unit.ts:322
resourceAmount(amount: number): voidParameters:#
| Name | Type |
|---|---|
amount | number |
Returns: void
Defined in: handles/unit.ts:318
selectable#
selectable(): booleanReturns: boolean
Defined in: handles/unit.ts:326
selectionScale#
selectionScale(): numberReturns: number
Defined in: handles/unit.ts:334
selectionScale(scale: number): voidParameters:#
| Name | Type |
|---|---|
scale | number |
Returns: void
Defined in: handles/unit.ts:330
show#
show(): booleanReturns: boolean
Defined in: handles/unit.ts:343
show(flag: boolean): voidParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:339
skillPoints#
skillPoints(): numberReturns the units available skill points.
Returns: number
Defined in: handles/unit.ts:358
skillPoints(skillPointDelta: number): voidAdds the amount to the units available skill points. Calling with a negative number reduces the skill points by that amount. Returns false if the amount of available skill points is already zero and if it's called with any non-positive number. Returns true in any other case.
note If skillPointDelta is greater than the amount of skillpoints the hero
actually can spend (like 9 for three 3-level abilities) only that amount will
be added. Negative skillPointDelta works as expected.
Parameters:#
| Name | Type |
|---|---|
skillPointDelta | number |
Returns: void
Defined in: handles/unit.ts:372
skin#
skin(): numberReturns: number
Defined in: handles/unit.ts:347
skin(skinId: number): voidParameters:#
| Name | Type |
|---|---|
skinId | number |
Returns: void
Defined in: handles/unit.ts:351
sleeping#
sleeping(): booleanReturns: boolean
Defined in: handles/unit.ts:376
strength#
strength(): numberReturns: number
Defined in: handles/unit.ts:380
strength(value: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:384
turnSpeed#
turnSpeed(): numberReturns: number
Defined in: handles/unit.ts:392
turnSpeed(value: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:388
typeId#
typeId(): numberReturns: number
Defined in: handles/unit.ts:396
userData#
userData(): numberReturns: number
Defined in: handles/unit.ts:400
userData(value: number): voidSets a single custom integer for a unit.
note This value is not used by any standard mechanisms in Warcraft III.
Parameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:409
waygateActive#
waygateActive(): booleanReturns: boolean
Defined in: handles/unit.ts:417
waygateActive(flag: boolean): voidParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:413
x#
x(): numberbug If the unit is loaded into a zeppelin this will not return the position
of the zeppelin but the last position of the unit before it was loaded into
the zeppelin.
Returns: number
Defined in: handles/unit.ts:426
x(value: number): voidnote If the unit has movementspeed of zero the unit will be moved but the model of the unit will not move.
note This does not cancel orders of the unit. setPosition does cancel orders.
Parameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:434
y#
y(): numberReturns: number
Defined in: handles/unit.ts:438
y(value: number): voidnote If the unit has movementspeed of zero the unit will be moved but the model of the unit will not move.
note This does not cancel orders of the unit. setPosition does cancel orders.
Parameters:#
| Name | Type |
|---|---|
value | number |
Returns: void
Defined in: handles/unit.ts:446
z#
z(): numberReturns: number
Defined in: handles/unit.ts:450
Methods#
addAbility#
addAbility(abilityId: number): booleanParameters:#
| Name | Type |
|---|---|
abilityId | number |
Returns: boolean
Defined in: handles/unit.ts:454
addAnimationProps#
addAnimationProps(animProperties: string, add: boolean): voidParameters:#
| Name | Type |
|---|---|
animProperties | string |
add | boolean |
Returns: void
Defined in: handles/unit.ts:458
addExperience#
addExperience(xpToAdd: number, showEyeCandy: boolean): voidAdds the input value of experience to the hero unit specified.
If the experience added exceeds the amount required for the hero to gain a level, then it will force the unit to gain a level and the remaining experience will spill over for the next level.
bug Adding negative value to experience will decrease it
by the stated value, but won't lower the level even if the experience value
after deduction is lower than the lower bound of the experience required to get
the stated level.
bug If the value will become lower than zero, the experience won't be negative, instead of it it'll be equal
to 4294967296+(supposed_negative_experience_value).
Parameters:#
| Name | Type | Description |
|---|---|---|
xpToAdd | number | The amount of experience to add to the hero unit. |
showEyeCandy | boolean | If the boolean input is true, then the hero-level-gain effect will be shown if the hero gains a level from the added experience. |
Returns: void
Defined in: handles/unit.ts:478
addIndicator#
addIndicator(red: number, blue: number, green: number, alpha: number): voidParameters:#
| Name | Type |
|---|---|
red | number |
blue | number |
green | number |
alpha | number |
Returns: void
Defined in: handles/unit.ts:482
addItem#
addItem(whichItem: Item): booleanParameters:#
| Name | Type |
|---|---|
whichItem | Item |
Returns: boolean
Defined in: handles/unit.ts:486
addItemById#
addItemById(itemId: number): ItemParameters:#
| Name | Type |
|---|---|
itemId | number |
Returns: Item
Defined in: handles/unit.ts:490
addItemToSlotById#
addItemToSlotById(itemId: number, itemSlot: number): booleanParameters:#
| Name | Type |
|---|---|
itemId | number |
itemSlot | number |
Returns: boolean
Defined in: handles/unit.ts:494
addItemToStock#
addItemToStock(itemId: number, currentStock: number, stockMax: number): voidParameters:#
| Name | Type |
|---|---|
itemId | number |
currentStock | number |
stockMax | number |
Returns: void
Defined in: handles/unit.ts:498
addResourceAmount#
addResourceAmount(amount: number): voidAdds the amount more gold to the whichUnit gold mine.
bug If the value after adding negative amount will be less than zero, then it
will display negative resource amount, but if some peasant or peon will try to
gather resources from such a mine, he will bring back 0 gold and the mine will
be auto-destroyed.
Parameters:#
| Name | Type | Description |
|---|---|---|
amount | number | The amount of resources to add to the unit. |
Returns: void
Defined in: handles/unit.ts:511
addSleepPerm#
addSleepPerm(add: boolean): voidParameters:#
| Name | Type |
|---|---|
add | boolean |
Returns: void
Defined in: handles/unit.ts:515
addType#
addType(whichUnitType: unittype): booleanParameters:#
| Name | Type |
|---|---|
whichUnitType | unittype |
Returns: boolean
Defined in: handles/unit.ts:519
addUnitToStock#
addUnitToStock(unitId: number, currentStock: number, stockMax: number): voidParameters:#
| Name | Type |
|---|---|
unitId | number |
currentStock | number |
stockMax | number |
Returns: void
Defined in: handles/unit.ts:523
applyTimedLife#
applyTimedLife(buffId: number, duration: number): voidParameters:#
| Name | Type |
|---|---|
buffId | number |
duration | number |
Returns: void
Defined in: handles/unit.ts:527
attachSound#
attachSound(sound: Sound): voidParameters:#
| Name | Type |
|---|---|
sound | Sound |
Returns: void
Defined in: handles/unit.ts:531
canSleepPerm#
canSleepPerm(): booleanReturns: boolean
Defined in: handles/unit.ts:539
cancelTimedLife#
cancelTimedLife(): voidReturns: void
Defined in: handles/unit.ts:535
countBuffs#
countBuffs(removePositive: boolean, removeNegative: boolean, magic: boolean, physical: boolean, timedLife: boolean, aura: boolean, autoDispel: boolean): numberParameters:#
| Name | Type |
|---|---|
removePositive | boolean |
removeNegative | boolean |
magic | boolean |
physical | boolean |
timedLife | boolean |
aura | boolean |
autoDispel | boolean |
Returns: number
Defined in: handles/unit.ts:543
damageAt#
damageAt(delay: number, radius: number, x: number, y: number, amount: number, attack: boolean, ranged: boolean, attackType: attacktype, damageType: damagetype, weaponType: weapontype): booleanParameters:#
| Name | Type |
|---|---|
delay | number |
radius | number |
x | number |
y | number |
amount | number |
attack | boolean |
ranged | boolean |
attackType | attacktype |
damageType | damagetype |
weaponType | weapontype |
Returns: boolean
Defined in: handles/unit.ts:547
damageTarget#
damageTarget(target: widget, amount: number, attack: boolean, ranged: boolean, attackType: attacktype, damageType: damagetype, weaponType: weapontype): booleanDeals damage to target widget from a source unit.
note For some insight about the different configurations of the different types see this post.
Parameters:#
| Name | Type | Description |
|---|---|---|
target | widget | The target being damaged. |
amount | number | How much damage is being dealt. |
attack | boolean | Consider the damage dealt as being an attack. |
ranged | boolean | Consider the damage dealt as being from a ranged source. |
attackType | attacktype | |
damageType | damagetype | |
weaponType | weapontype |
Returns: boolean
Defined in: handles/unit.ts:574
decAbilityLevel#
decAbilityLevel(abilCode: number): numberDecreases the level of a unit's ability by 1. The level will not go below 1.
Parameters:#
| Name | Type | Description |
|---|---|---|
abilCode | number | The four digit rawcode representation of the ability. |
Returns: number
The new ability level.
Defined in: handles/unit.ts:583
destroy#
destroy(): voidInstantly removes the unit from the game.
Returns: void
Defined in: handles/unit.ts:590
disableAbility#
disableAbility(abilId: number, flag: boolean, hideUI: boolean): voidParameters:#
| Name | Type |
|---|---|
abilId | number |
flag | boolean |
hideUI | boolean |
Returns: void
Defined in: handles/unit.ts:594
dropItem#
dropItem(whichItem: Item, x: number, y: number): booleanParameters:#
| Name | Type |
|---|---|
whichItem | Item |
x | number |
y | number |
Returns: boolean
Defined in: handles/unit.ts:598
dropItemFromSlot#
dropItemFromSlot(whichItem: Item, slot: number): booleanParameters:#
| Name | Type |
|---|---|
whichItem | Item |
slot | number |
Returns: boolean
Defined in: handles/unit.ts:602
dropItemTarget#
dropItemTarget(whichItem: Item, target: Widget): booleanParameters:#
| Name | Type |
|---|---|
whichItem | Item |
target | Widget |
Returns: boolean
Defined in: handles/unit.ts:606
endAbilityCooldown#
endAbilityCooldown(abilCode: number): voidParameters:#
| Name | Type |
|---|---|
abilCode | number |
Returns: void
Defined in: handles/unit.ts:610
getAbility#
getAbility(abilId: number): abilityParameters:#
| Name | Type |
|---|---|
abilId | number |
Returns: ability
Defined in: handles/unit.ts:614
getAbilityByIndex#
getAbilityByIndex(index: number): abilityParameters:#
| Name | Type |
|---|---|
index | number |
Returns: ability
Defined in: handles/unit.ts:618
getAbilityCooldown#
getAbilityCooldown(abilId: number, level: number): numberParameters:#
| Name | Type |
|---|---|
abilId | number |
level | number |
Returns: number
Defined in: handles/unit.ts:622
getAbilityCooldownRemaining#
getAbilityCooldownRemaining(abilId: number): numberParameters:#
| Name | Type |
|---|---|
abilId | number |
Returns: number
Defined in: handles/unit.ts:626
getAbilityLevel#
getAbilityLevel(abilCode: number): numberReturns the level of the ability for the unit.
note This function is not zero indexed.
Parameters:#
| Name | Type |
|---|---|
abilCode | number |
Returns: number
Defined in: handles/unit.ts:634
getAbilityManaCost#
getAbilityManaCost(abilId: number, level: number): numberParameters:#
| Name | Type |
|---|---|
abilId | number |
level | number |
Returns: number
Defined in: handles/unit.ts:638
getAgility#
getAgility(includeBonuses: boolean): numberParameters:#
| Name | Type |
|---|---|
includeBonuses | boolean |
Returns: number
Defined in: handles/unit.ts:642
getAttackCooldown#
getAttackCooldown(weaponIndex: number): numberParameters:#
| Name | Type |
|---|---|
weaponIndex | number |
Returns: number
Defined in: handles/unit.ts:646
getBaseDamage#
getBaseDamage(weaponIndex: number): numberParameters:#
| Name | Type |
|---|---|
weaponIndex | number |
Returns: number
Defined in: handles/unit.ts:650
getDiceNumber#
getDiceNumber(weaponIndex: number): numberParameters:#
| Name | Type |
|---|---|
weaponIndex | number |
Returns: number
Defined in: handles/unit.ts:654
getDiceSides#
getDiceSides(weaponIndex: number): numberParameters:#
| Name | Type |
|---|---|
weaponIndex | number |
Returns: number
Defined in: handles/unit.ts:658
getField#
getField(field: unitbooleanfield | unitintegerfield | unitrealfield | unitstringfield): string | number | booleanParameters:#
| Name | Type |
|---|---|
field | unitbooleanfield | unitintegerfield | unitrealfield | unitstringfield |
Returns: string | number | boolean
Defined in: handles/unit.ts:662
getHeroLevel#
getHeroLevel(): numberReturns: number
Defined in: handles/unit.ts:691
getIgnoreAlarm#
getIgnoreAlarm(flag: boolean): booleanParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: boolean
Defined in: handles/unit.ts:695
getIntelligence#
getIntelligence(includeBonuses: boolean): numberParameters:#
| Name | Type |
|---|---|
includeBonuses | boolean |
Returns: number
Defined in: handles/unit.ts:699
getItemInSlot#
getItemInSlot(slot: number): ItemParameters:#
| Name | Type |
|---|---|
slot | number |
Returns: Item
Defined in: handles/unit.ts:703
getState#
getState(whichUnitState: unitstate): numberParameters:#
| Name | Type |
|---|---|
whichUnitState | unitstate |
Returns: number
Defined in: handles/unit.ts:707
getStrength#
getStrength(includeBonuses: boolean): numberParameters:#
| Name | Type |
|---|---|
includeBonuses | boolean |
Returns: number
Defined in: handles/unit.ts:711
getflyHeight#
getflyHeight(): numberReturns: number
Defined in: handles/unit.ts:687
hasBuffs#
hasBuffs(removePositive: boolean, removeNegative: boolean, magic: boolean, physical: boolean, timedLife: boolean, aura: boolean, autoDispel: boolean): booleanParameters:#
| Name | Type |
|---|---|
removePositive | boolean |
removeNegative | boolean |
magic | boolean |
physical | boolean |
timedLife | boolean |
aura | boolean |
autoDispel | boolean |
Returns: boolean
Defined in: handles/unit.ts:715
hasItem#
hasItem(whichItem: Item): booleanParameters:#
| Name | Type |
|---|---|
whichItem | Item |
Returns: boolean
Defined in: handles/unit.ts:719
hideAbility#
hideAbility(abilId: number, flag: boolean): voidParameters:#
| Name | Type |
|---|---|
abilId | number |
flag | boolean |
Returns: void
Defined in: handles/unit.ts:723
inForce#
inForce(whichForce: Force): booleanParameters:#
| Name | Type |
|---|---|
whichForce | Force |
Returns: boolean
Defined in: handles/unit.ts:741
inGroup#
inGroup(whichGroup: Group): booleanParameters:#
| Name | Type |
|---|---|
whichGroup | Group |
Returns: boolean
Defined in: handles/unit.ts:745
inRange#
inRange(x: number, y: number, distance: number): booleanParameters:#
| Name | Type |
|---|---|
x | number |
y | number |
distance | number |
Returns: boolean
Defined in: handles/unit.ts:749
inRangeOfPoint#
inRangeOfPoint(whichPoint: Point, distance: number): booleanParameters:#
| Name | Type |
|---|---|
whichPoint | Point |
distance | number |
Returns: boolean
Defined in: handles/unit.ts:753
inRangeOfUnit#
inRangeOfUnit(otherUnit: Unit, distance: number): booleanParameters:#
| Name | Type |
|---|---|
otherUnit | Unit |
distance | number |
Returns: boolean
Defined in: handles/unit.ts:757
inTransport#
inTransport(whichTransport: Unit): booleanParameters:#
| Name | Type |
|---|---|
whichTransport | Unit |
Returns: boolean
Defined in: handles/unit.ts:765
incAbilityLevel#
incAbilityLevel(abilCode: number): numberIncreases the level of a unit's ability by 1.
note incAbilityLevel can increase an abilities level to maxlevel+1. On maxlevel+1 all ability fields are 0.
http://www.wc3c.net/showthread.php?p=1029039#post1029039 http://www.hiveworkshop.com/forums/lab-715/silenceex-everything-you-dont-know-about-silence-274351/.
Parameters:#
| Name | Type | Description |
|---|---|---|
abilCode | number | The four digit rawcode representation of the ability. |
Returns: number
The new ability level.
Defined in: handles/unit.ts:737
interruptAttack#
interruptAttack(): voidReturns: void
Defined in: handles/unit.ts:761
isAlive#
isAlive(): booleanReturns: boolean
Defined in: handles/unit.ts:769
isAlly#
isAlly(whichPlayer: MapPlayer): booleanParameters:#
| Name | Type |
|---|---|
whichPlayer | MapPlayer |
Returns: boolean
Defined in: handles/unit.ts:773
isEnemy#
isEnemy(whichPlayer: MapPlayer): booleanParameters:#
| Name | Type |
|---|---|
whichPlayer | MapPlayer |
Returns: boolean
Defined in: handles/unit.ts:777
isExperienceSuspended#
isExperienceSuspended(): booleanReturns: boolean
Defined in: handles/unit.ts:781
isFogged#
isFogged(whichPlayer: MapPlayer): booleanParameters:#
| Name | Type |
|---|---|
whichPlayer | MapPlayer |
Returns: boolean
Defined in: handles/unit.ts:785
isHero#
isHero(): booleanReturns: boolean
Defined in: handles/unit.ts:789
isIllusion#
isIllusion(): booleanReturns: boolean
Defined in: handles/unit.ts:793
isLoaded#
isLoaded(): booleanReturns: boolean
Defined in: handles/unit.ts:797
isMasked#
isMasked(whichPlayer: MapPlayer): booleanParameters:#
| Name | Type |
|---|---|
whichPlayer | MapPlayer |
Returns: boolean
Defined in: handles/unit.ts:801
isSelected#
isSelected(whichPlayer: MapPlayer): booleanParameters:#
| Name | Type |
|---|---|
whichPlayer | MapPlayer |
Returns: boolean
Defined in: handles/unit.ts:805
isUnit#
isUnit(whichSpecifiedUnit: Unit): booleannote Useless. Use operator == instead.
Parameters:#
| Name | Type |
|---|---|
whichSpecifiedUnit | Unit |
Returns: boolean
Defined in: handles/unit.ts:844
isUnitType#
isUnitType(whichUnitType: unittype): booleannote This native returns a boolean, which when typecasted to integer might be greater than 1. It's probably implemented via a bitset.
note In past patches this native bugged when used in conditionfuncs.
The fix back then was to compare with true (==true).
I cannot reproduce the faulty behaviour in patch 1.27 so this is only a note.
Parameters:#
| Name | Type | Description |
|---|---|---|
whichUnitType | unittype |
Returns: boolean
Defined in: handles/unit.ts:855
isVisible#
isVisible(whichPlayer: MapPlayer): booleanParameters:#
| Name | Type |
|---|---|
whichPlayer | MapPlayer |
Returns: boolean
Defined in: handles/unit.ts:859
issueBuildOrder#
issueBuildOrder(unit: string | number, x: number, y: number): booleanParameters:#
| Name | Type |
|---|---|
unit | string | number |
x | number |
y | number |
Returns: boolean
Defined in: handles/unit.ts:809
issueImmediateOrder#
issueImmediateOrder(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest): booleanParameters:#
| Name | Type |
|---|---|
order | string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest |
Returns: boolean
Defined in: handles/unit.ts:813
issueInstantOrderAt#
issueInstantOrderAt(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, x: number, y: number, instantTargetWidget: Widget): booleanParameters:#
| Name | Type |
|---|---|
order | string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest |
x | number |
y | number |
instantTargetWidget | Widget |
Returns: boolean
Defined in: handles/unit.ts:817
issueInstantTargetOrder#
issueInstantTargetOrder(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, targetWidget: Widget, instantTargetWidget: Widget): booleanParameters:#
| Name | Type |
|---|---|
order | string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest |
targetWidget | Widget |
instantTargetWidget | Widget |
Returns: boolean
Defined in: handles/unit.ts:823
issueOrderAt#
issueOrderAt(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, x: number, y: number): booleanParameters:#
| Name | Type |
|---|---|
order | string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest |
x | number |
y | number |
Returns: boolean
Defined in: handles/unit.ts:829
issuePointOrder#
issuePointOrder(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, whichPoint: Point): booleanParameters:#
| Name | Type |
|---|---|
order | string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest |
whichPoint | Point |
Returns: boolean
Defined in: handles/unit.ts:833
issueTargetOrder#
issueTargetOrder(order: string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest, targetWidget: Widget): booleanParameters:#
| Name | Type |
|---|---|
order | string | Absorb | Acidbomb | Acolyteharvest | Aimove | Ambush | Ancestralspirit | Ancestralspirittarget | Animatedead | Antimagicshell | Attack | Attackground | Attackonce | Attributemodskill | Auraunholy | Auravampiric | Autodispel | Autodispeloff | Autodispelon | Autoentangle | Autoentangleinstant | Autoharvestgold | Autoharvestlumber | Avatar | Avengerform | Awaken | Banish | Barkskin | Barkskinoff | Barkskinon | Battleroar | Bearform | Berserk | Blackarrow | Blackarrowoff | Blackarrowon | Blight | Blink | Blizzard | Bloodlust | Bloodlustoff | Bloodluston | Board | Breathoffire | Breathoffrost | Build | Burrow | Cancel | Cannibalize | Carrionscarabs | Carrionscarabsinstant | Carrionscarabsoff | Carrionscarabson | Carrionswarm | Chainlightning | Channel | Charm | Chemicalrage | Cloudoffog | Clusterrockets | Coldarrows | Coldarrowstarg | Controlmagic | Corporealform | Corrosivebreath | Coupleinstant | Coupletarget | Creepanimatedead | Creepdevour | Creepheal | Creephealoff | Creephealon | Creepthunderbolt | Creepthunderclap | Cripple | Curse | Curseoff | Curseon | Cyclone | Darkconversion | Darkportal | Darkritual | Darksummoning | Deathanddecay | Deathcoil | Deathpact | Decouple | Defend | Detectaoe | Detonate | Devour | Devourmagic | Disassociate | Disenchant | Dismount | Dispel | Divineshield | Doom | Drain | Dreadlordinferno | Dropitem | Drunkenhaze | Earthquake | Eattree | Elementalfury | Ensnare | Ensnareoff | Ensnareon | Entangle | Entangleinstant | Entanglingroots | Etherealform | Evileye | Faeriefire | Faeriefireoff | Faeriefireon | Fanofknives | Farsight | Fingerofdeath | Firebolt | Flamestrike | Flamingarrows | Flamingarrowstarg | Flamingattack | Flamingattacktarg | Flare | Forceboard | Forceofnature | Freezingbreath | Frenzy | Frenzyoff | Frenzyon | Frostarmor | Frostarmoroff | Frostarmoron | Frostnova | Getitem | Gold2lumber | Grabtree | Harvest | Heal | Healingspray | Healingward | Healingwave | Healoff | Healon | Hex | Holdposition | Holybolt | Howlofterror | Humanbuild | Immolation | Impale | Incineratearrow | Incineratearrowoff | Incineratearrowon | Inferno | Innerfire | Innerfireoff | Innerfireon | Instant | Instant1 | Instant2 | Instant3 | Instant4 | Invisibility | Lavamonster | Lightningshield | Load | Loadarcher | Loadcorpse | Loadcorpseinstant | Locustswarm | Lumber2gold | Magicdefense | Magicleash | Magicundefense | Manaburn | Manaflareoff | Manaflareon | Manashieldoff | Manashieldon | Massteleport | Mechanicalcritter | Metamorphosis | Militia | Militiaconvert | Militiaoff | Militiaunconvert | Mindrot | Mirrorimage | Monsoon | Mount | Mounthippogryph | Move | Moveslot1 | Moveslot2 | Moveslot3 | Moveslot4 | Moveslot5 | Moveslot6 | Nagabuild | Neutraldetectaoe | Neutralinteract | Neutralspell | Nightelfbuild | Orcbuild | Parasite | Parasiteoff | Parasiteon | Patrol | Phaseshift | Phaseshiftinstant | Phaseshiftoff | Phaseshifton | Phoenixfire | Phoenixmorph | Poisonarrows | Poisonarrowstarg | Polymorph | Possession | Preservation | Purge | Rainofchaos | Rainoffire | Raisedead | Raisedeadoff | Raisedeadon | Ravenform | Recharge | Rechargeoff | Rechargeon | Rejuvination | Renew | Renewoff | Renewon | Repair | Repairoff | Repairon | Replenish | Replenishlife | Replenishlifeoff | Replenishlifeon | Replenishmana | Replenishmanaoff | Replenishmanaon | Replenishoff | Replenishon | Request_hero | Requestsacrifice | Restoration | Restorationoff | Restorationon | Resumebuild | Resumeharvesting | Resurrection | Returnresources | Revenge | Revive | Roar | Robogoblin | Root | Sacrifice | Sanctuary | Scout | Scrollofspeed | Selfdestruct | Selfdestructoff | Selfdestructon | Sentinel | Setrally | Shadowsight | Shadowstrike | Shockwave | Silence | Skillmenu | Sleep | Slow | Slowoff | Slowon | Smart | Soulburn | Soulpreservation | Spellshield | Spellshieldaoe | Spellsteal | Spellstealoff | Spellstealon | Spies | Spiritlink | Spiritofvengeance | Spirittroll | Spiritwolf | Stampede | Standdown | Starfall | Stasistrap | Steal | Stomp | Stoneform | Stop | Stunned | Submerge | Summonfactory | Summongrizzly | Summonphoenix | Summonquillbeast | Summonwareagle | Tankdroppilot | Tankloadpilot | Tankpilot | Taunt | Thunderbolt | Thunderclap | Tornado | Townbelloff | Townbellon | Tranquility | Transmute | Unavatar | Unavengerform | Unbearform | Unburrow | Uncoldarrows | Uncorporealform | Undeadbuild | Undefend | Undivineshield | Unetherealform | Unflamingarrows | Unflamingattack | Unholyfrenzy | Unimmolation | Unload | Unloadall | Unloadallcorpses | Unloadallinstant | Unpoisonarrows | Unravenform | Unrobogoblin | Unroot | Unstableconcoction | Unstoneform | Unsubmerge | Unsummon | Unwindwalk | Useslot1 | Useslot2 | Useslot3 | Useslot4 | Useslot5 | Useslot6 | Vengeance | Vengeanceinstant | Vengeanceoff | Vengeanceon | Volcano | Voodoo | Ward | Waterelemental | Wateryminion | Web | Weboff | Webon | Whirlwind | Windwalk | Wispharvest |
targetWidget | Widget |
Returns: boolean
Defined in: handles/unit.ts:837
kill#
kill(): voidKills the unit.
Returns: void
Defined in: handles/unit.ts:866
lookAt#
lookAt(whichBone: string, lookAtTarget: Unit, offsetX: number, offsetY: number, offsetZ: number): voidLocks a unit's bone to face the target until ResetUnitLookAt is called.
The offset coordinates ( X, Y, Z ) are taken from the target's origin. The bones will lock to the lookAtTarget, offset by those coordinates. You can't have both the head and the chest locked to the target at the same time.
note The parameter whichBone can only move the head bones and the chest bones.
All other input will default to the head bone. However, the function only looks
for the helper named "Bone_Head" (or "Bone_Chest") in the MDL, so you can just
rename a helper so that it will move that set of bones instead.
note SetUnitLookAt is affected by animation speed and blend time.
note How to instantly set a unit's facing
Parameters:#
| Name | Type | Description |
|---|---|---|
whichBone | string | The bone to lock onto the target. The engine only supports locking the head and the chest. To lock the head, you can put in any input except a null string. To lock the chest, the string must start with "bone_chest". All leading spaces are ignored, it is case insensitive, and anything after the first non-leading space will be ignored. |
lookAtTarget | Unit | - |
offsetX | number | The x-offset from lookAtTarget's origin point. |
offsetY | number | The y-offset from lookAtTarget's origin point. |
offsetZ | number | The z-offset from lookAtTarget's origin point (this already factors in the terrain Z). |
Returns: void
Defined in: handles/unit.ts:892
makeAbilityPermanent#
makeAbilityPermanent(permanent: boolean, abilityId: number): voidThis native is used to keep abilities when morphing units
Parameters:#
| Name | Type |
|---|---|
permanent | boolean |
abilityId | number |
Returns: void
Defined in: handles/unit.ts:899
modifySkillPoints#
modifySkillPoints(skillPointDelta: number): booleanParameters:#
| Name | Type |
|---|---|
skillPointDelta | number |
Returns: boolean
Defined in: handles/unit.ts:903
pauseEx#
pauseEx(flag: boolean): voidParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:907
pauseTimedLife#
pauseTimedLife(flag: boolean): voidParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:911
queueAnimation#
queueAnimation(whichAnimation: string): voidParameters:#
| Name | Type |
|---|---|
whichAnimation | string |
Returns: void
Defined in: handles/unit.ts:915
recycleGuardPosition#
recycleGuardPosition(): voidReturns: void
Defined in: handles/unit.ts:919
removeAbility#
removeAbility(abilityId: number): booleanParameters:#
| Name | Type |
|---|---|
abilityId | number |
Returns: boolean
Defined in: handles/unit.ts:923
removeBuffs#
removeBuffs(removePositive: boolean, removeNegative: boolean): voidParameters:#
| Name | Type |
|---|---|
removePositive | boolean |
removeNegative | boolean |
Returns: void
Defined in: handles/unit.ts:927
removeBuffsEx#
removeBuffsEx(removePositive: boolean, removeNegative: boolean, magic: boolean, physical: boolean, timedLife: boolean, aura: boolean, autoDispel: boolean): voidParameters:#
| Name | Type |
|---|---|
removePositive | boolean |
removeNegative | boolean |
magic | boolean |
physical | boolean |
timedLife | boolean |
aura | boolean |
autoDispel | boolean |
Returns: void
Defined in: handles/unit.ts:931
removeGuardPosition#
removeGuardPosition(): voidReturns: void
Defined in: handles/unit.ts:935
removeItem#
removeItem(whichItem: Item): voidThe item is removed from the Hero and placed on the ground at the Hero's feet.
Parameters:#
| Name | Type | Description |
|---|---|---|
whichItem | Item | The item to remove. |
Returns: void
Defined in: handles/unit.ts:943
removeItemFromSlot#
removeItemFromSlot(itemSlot: number): ItemIf an item exists in the given slot, it is removed from the Hero and placed on the ground at the Hero's feed
Parameters:#
| Name | Type | Description |
|---|---|---|
itemSlot | number |
Returns: Item
Defined in: handles/unit.ts:952
removeItemFromStock#
removeItemFromStock(itemId: number): voidParameters:#
| Name | Type |
|---|---|
itemId | number |
Returns: void
Defined in: handles/unit.ts:956
removeType#
removeType(whichUnitType: unittype): booleanParameters:#
| Name | Type |
|---|---|
whichUnitType | unittype |
Returns: boolean
Defined in: handles/unit.ts:960
removeUnitFromStock#
removeUnitFromStock(itemId: number): voidParameters:#
| Name | Type |
|---|---|
itemId | number |
Returns: void
Defined in: handles/unit.ts:964
resetCooldown#
resetCooldown(): voidReturns: void
Defined in: handles/unit.ts:968
resetLookAt#
resetLookAt(): voidUnlocks the bone oriented by lookAt, allowing it to move in accordance to the unit's regular animations.
Returns: void
Defined in: handles/unit.ts:975
revive#
revive(x: number, y: number, doEyecandy: boolean): booleanParameters:#
| Name | Type |
|---|---|
x | number |
y | number |
doEyecandy | boolean |
Returns: boolean
Defined in: handles/unit.ts:979
reviveAtPoint#
reviveAtPoint(whichPoint: Point, doEyecandy: boolean): booleanParameters:#
| Name | Type |
|---|---|
whichPoint | Point |
doEyecandy | boolean |
Returns: boolean
Defined in: handles/unit.ts:983
select#
select(flag: boolean): voidParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:987
selectSkill#
selectSkill(abilCode: number): voidParameters:#
| Name | Type |
|---|---|
abilCode | number |
Returns: void
Defined in: handles/unit.ts:991
setAbilityCooldown#
setAbilityCooldown(abilId: number, level: number, cooldown: number): voidParameters:#
| Name | Type |
|---|---|
abilId | number |
level | number |
cooldown | number |
Returns: void
Defined in: handles/unit.ts:995
setAbilityLevel#
setAbilityLevel(abilCode: number, level: number): numberParameters:#
| Name | Type |
|---|---|
abilCode | number |
level | number |
Returns: number
Defined in: handles/unit.ts:999
setAbilityManaCost#
setAbilityManaCost(abilId: number, level: number, manaCost: number): voidParameters:#
| Name | Type |
|---|---|
abilId | number |
level | number |
manaCost | number |
Returns: void
Defined in: handles/unit.ts:1003
setAgility#
setAgility(value: number, permanent: boolean): voidParameters:#
| Name | Type |
|---|---|
value | number |
permanent | boolean |
Returns: void
Defined in: handles/unit.ts:1007
setAnimation#
setAnimation(whichAnimation: string | number): voidParameters:#
| Name | Type |
|---|---|
whichAnimation | string | number |
Returns: void
Defined in: handles/unit.ts:1011
setAnimationWithRarity#
setAnimationWithRarity(whichAnimation: string, rarity: raritycontrol): voidParameters:#
| Name | Type |
|---|---|
whichAnimation | string |
rarity | raritycontrol |
Returns: void
Defined in: handles/unit.ts:1019
setAttackCooldown#
setAttackCooldown(cooldown: number, weaponIndex: number): voidParameters:#
| Name | Type |
|---|---|
cooldown | number |
weaponIndex | number |
Returns: void
Defined in: handles/unit.ts:1023
setBaseDamage#
setBaseDamage(baseDamage: number, weaponIndex: number): voidParameters:#
| Name | Type |
|---|---|
baseDamage | number |
weaponIndex | number |
Returns: void
Defined in: handles/unit.ts:1027
setBlendTime#
setBlendTime(timeScale: number): voidParameters:#
| Name | Type |
|---|---|
timeScale | number |
Returns: void
Defined in: handles/unit.ts:1031
setConstructionProgress#
setConstructionProgress(constructionPercentage: number): voidParameters:#
| Name | Type |
|---|---|
constructionPercentage | number |
Returns: void
Defined in: handles/unit.ts:1035
setCreepGuard#
setCreepGuard(creepGuard: boolean): voidParameters:#
| Name | Type |
|---|---|
creepGuard | boolean |
Returns: void
Defined in: handles/unit.ts:1039
setDiceNumber#
setDiceNumber(diceNumber: number, weaponIndex: number): voidParameters:#
| Name | Type |
|---|---|
diceNumber | number |
weaponIndex | number |
Returns: void
Defined in: handles/unit.ts:1043
setDiceSides#
setDiceSides(diceSides: number, weaponIndex: number): voidParameters:#
| Name | Type |
|---|---|
diceSides | number |
weaponIndex | number |
Returns: void
Defined in: handles/unit.ts:1047
setExperience#
setExperience(newXpVal: number, showEyeCandy: boolean): voidParameters:#
| Name | Type |
|---|---|
newXpVal | number |
showEyeCandy | boolean |
Returns: void
Defined in: handles/unit.ts:1051
setExploded#
setExploded(exploded: boolean): voidParameters:#
| Name | Type |
|---|---|
exploded | boolean |
Returns: void
Defined in: handles/unit.ts:1055
setFacingEx#
setFacingEx(facingAngle: number): voidParameters:#
| Name | Type |
|---|---|
facingAngle | number |
Returns: void
Defined in: handles/unit.ts:1059
setField#
setField(field: unitbooleanfield | unitintegerfield | unitrealfield | unitstringfield, value: string | number | boolean): booleanParameters:#
| Name | Type |
|---|---|
field | unitbooleanfield | unitintegerfield | unitrealfield | unitstringfield |
value | string | number | boolean |
Returns: boolean
Defined in: handles/unit.ts:1063
setHeroLevel#
setHeroLevel(level: number, showEyeCandy: boolean): voidParameters:#
| Name | Type |
|---|---|
level | number |
showEyeCandy | boolean |
Returns: void
Defined in: handles/unit.ts:1083
setIntelligence#
setIntelligence(value: number, permanent: boolean): voidParameters:#
| Name | Type |
|---|---|
value | number |
permanent | boolean |
Returns: void
Defined in: handles/unit.ts:1087
setItemTypeSlots#
setItemTypeSlots(slots: number): voidParameters:#
| Name | Type |
|---|---|
slots | number |
Returns: void
Defined in: handles/unit.ts:1091
setOwner#
setOwner(whichPlayer: MapPlayer, changeColor: boolean): voidParameters:#
| Name | Type |
|---|---|
whichPlayer | MapPlayer |
changeColor | boolean |
Returns: void
Defined in: handles/unit.ts:1095
setPathing#
setPathing(flag: boolean): voidParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:1099
setPosition#
setPosition(x: number, y: number): voidnote This cancels the orders of the unit. If you want to move a unit without canceling its orders set x/y.
Parameters:#
| Name | Type |
|---|---|
x | number |
y | number |
Returns: void
Defined in: handles/unit.ts:1106
setRescuable#
setRescuable(byWhichPlayer: MapPlayer, flag: boolean): voidParameters:#
| Name | Type |
|---|---|
byWhichPlayer | MapPlayer |
flag | boolean |
Returns: void
Defined in: handles/unit.ts:1110
setRescueRange#
setRescueRange(range: number): voidParameters:#
| Name | Type |
|---|---|
range | number |
Returns: void
Defined in: handles/unit.ts:1114
setScale#
setScale(scaleX: number, scaleY: number, scaleZ: number): voidbug Only takes scaleX into account and uses scaleX for all three dimensions.
Parameters:#
| Name | Type | Description |
|---|---|---|
scaleX | number | This is actually the scale for all dimensions |
scaleY | number | This parameter is not taken into account |
scaleZ | number | This parameter is not taken into account |
Returns: void
Defined in: handles/unit.ts:1124
setState#
setState(whichUnitState: unitstate, newVal: number): voidParameters:#
| Name | Type |
|---|---|
whichUnitState | unitstate |
newVal | number |
Returns: void
Defined in: handles/unit.ts:1128
setStrength#
setStrength(value: number, permanent: boolean): voidParameters:#
| Name | Type |
|---|---|
value | number |
permanent | boolean |
Returns: void
Defined in: handles/unit.ts:1132
setTimeScale#
setTimeScale(timeScale: number): voidParameters:#
| Name | Type |
|---|---|
timeScale | number |
Returns: void
Defined in: handles/unit.ts:1136
setUnitAttackCooldown#
setUnitAttackCooldown(cooldown: number, weaponIndex: number): voidParameters:#
| Name | Type |
|---|---|
cooldown | number |
weaponIndex | number |
Returns: void
Defined in: handles/unit.ts:1140
setUnitTypeSlots#
setUnitTypeSlots(slots: number): voidParameters:#
| Name | Type |
|---|---|
slots | number |
Returns: void
Defined in: handles/unit.ts:1144
setUpgradeProgress#
setUpgradeProgress(upgradePercentage: number): voidParameters:#
| Name | Type |
|---|---|
upgradePercentage | number |
Returns: void
Defined in: handles/unit.ts:1148
setUseAltIcon#
setUseAltIcon(flag: boolean): voidParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:1152
setUseFood#
setUseFood(useFood: boolean): voidParameters:#
| Name | Type |
|---|---|
useFood | boolean |
Returns: void
Defined in: handles/unit.ts:1156
setVertexColor#
setVertexColor(red: number, green: number, blue: number, alpha: number): voidSets the unit's color to the color defined by (red,green,blue,alpha).
Parameters:#
| Name | Type | Description |
|---|---|---|
red | number | An integer from 0-255 determining the amount of red color. |
green | number | An integer from 0-255 determining the amount of green color. |
blue | number | An integer from 0-255 determining the amount of blue color. |
alpha | number | An integer from 0-255 determining the amount of alpha color. |
Returns: void
Defined in: handles/unit.ts:1167
setflyHeight#
setflyHeight(value: number, rate: number): voidParameters:#
| Name | Type |
|---|---|
value | number |
rate | number |
Returns: void
Defined in: handles/unit.ts:1079
shareVision#
shareVision(whichPlayer: MapPlayer, share: boolean): voidParameters:#
| Name | Type |
|---|---|
whichPlayer | MapPlayer |
share | boolean |
Returns: void
Defined in: handles/unit.ts:1171
showTeamGlow#
showTeamGlow(show: boolean): voidParameters:#
| Name | Type |
|---|---|
show | boolean |
Returns: void
Defined in: handles/unit.ts:1175
startAbilityCooldown#
startAbilityCooldown(abilCode: number, cooldown: number): voidParameters:#
| Name | Type |
|---|---|
abilCode | number |
cooldown | number |
Returns: void
Defined in: handles/unit.ts:1179
stripLevels#
stripLevels(howManyLevels: number): booleanParameters:#
| Name | Type |
|---|---|
howManyLevels | number |
Returns: boolean
Defined in: handles/unit.ts:1183
suspendDecay#
suspendDecay(suspend: boolean): voidParameters:#
| Name | Type |
|---|---|
suspend | boolean |
Returns: void
Defined in: handles/unit.ts:1187
suspendExperience#
suspendExperience(flag: boolean): voidParameters:#
| Name | Type |
|---|---|
flag | boolean |
Returns: void
Defined in: handles/unit.ts:1191
useItem#
useItem(whichItem: Item): booleanParameters:#
| Name | Type |
|---|---|
whichItem | Item |
Returns: boolean
Defined in: handles/unit.ts:1195
useItemAt#
useItemAt(whichItem: Item, x: number, y: number): booleanParameters:#
| Name | Type |
|---|---|
whichItem | Item |
x | number |
y | number |
Returns: boolean
Defined in: handles/unit.ts:1199
useItemTarget#
useItemTarget(whichItem: Item, target: Widget): booleanParameters:#
| Name | Type |
|---|---|
whichItem | Item |
target | Widget |
Returns: boolean
Defined in: handles/unit.ts:1203
wakeUp#
wakeUp(): voidReturns: void
Defined in: handles/unit.ts:1207
waygateGetDestinationX#
waygateGetDestinationX(): numberReturns: number
Defined in: handles/unit.ts:1211
waygateGetDestinationY#
waygateGetDestinationY(): numberReturns: number
Defined in: handles/unit.ts:1215
waygateSetDestination#
waygateSetDestination(x: number, y: number): voidParameters:#
| Name | Type |
|---|---|
x | number |
y | number |
Returns: void
Defined in: handles/unit.ts:1219
foodMadeByType#
static foodMadeByType(unitId: number): numberParameters:#
| Name | Type |
|---|---|
unitId | number |
Returns: number
Defined in: handles/unit.ts:1223
foodUsedByType#
static foodUsedByType(unitId: number): numberParameters:#
| Name | Type |
|---|---|
unitId | number |
Returns: number
Defined in: handles/unit.ts:1227
fromEnum#
static fromEnum(): UnitReturns: Unit
Defined in: handles/unit.ts:1231
fromEvent#
static fromEvent(): UnitReturns: Unit
Overrides: Widget
Defined in: handles/unit.ts:1235
fromFilter#
static fromFilter(): UnitReturns: Unit
Defined in: handles/unit.ts:1239
fromHandle#
static fromHandle(handle: unit): UnitParameters:#
| Name | Type |
|---|---|
handle | unit |
Returns: Unit
Overrides: Widget
Defined in: handles/unit.ts:1243
getPointValueByType#
static getPointValueByType(unitType: number): numberParameters:#
| Name | Type |
|---|---|
unitType | number |
Returns: number
Defined in: handles/unit.ts:1247
isUnitIdHero#
static isUnitIdHero(unitId: number): booleanParameters:#
| Name | Type |
|---|---|
unitId | number |
Returns: boolean
Defined in: handles/unit.ts:1251
isUnitIdType#
static isUnitIdType(unitId: number, whichUnitType: unittype): booleanParameters:#
| Name | Type |
|---|---|
unitId | number |
whichUnitType | unittype |
Returns: boolean
Defined in: handles/unit.ts:1255