# Add Ability

Grammar — Add inBehavior to inUnit
FlagsNative | Action

Added ability may not be able to be cast without command buttons. You can set a ability to automaticly create command button, by go to the ability’s Command+ field, and assigne default button for them. “Use Default Button” and “Create Default Button” flags needs to be check to allow the button to be auto created. The position of the auto-created button can be set in the Button data.

# Arguments

  • unit — Unit
  • string [ gamelink::Abil ] — Ability

Returns — void

native void UnitAbilityAdd(unit inUnit, string inBehavior);

Category: Ability / Basic

# Examples

# mods/warcoop/warclassicsystem.sc2mod


// L288
UnitAbilityAdd(lv_townHall, "Amic")