Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API UnitCanAssist

Last wiki revision 2022-07-22

Indicates whether the first unit can assist the second unit.

canAssist = UnitCanAssist(unitToAssist, unitToBeAssisted)

  • unitToAssist : UnitId - the unit that would assist (e.g., "player" or "target")
  • unitToBeAssisted : UnitId - the unit that would be assisted (e.g., "player" or "target")
  • canAssist: - 1 if the unitToAssist can assist the unitToBeAssisted, nil otherwise.

if (UnitCanAssist("player", "target")) then DEFAULT_CHAT_FRAME:AddMessage("You can assist the target.") else DEFAULT_CHAT_FRAME:AddMessage("You cannot assist the target.") end

A message indicating whether the player can assist the current target is displayed in the default chat frame.

Source

https://warcraft.wiki.gg/wiki/API_UnitCanAssist · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.