# Enable/Disable Experience Gain For Unit

Grammarenable|Enable/Disable behavior experience gain for unit
FlagsNative | Action

Enables or disables experience gain for the specified unit.

# Arguments

  • unit — Unit
  • string [ gamelink::Behavior ] — Behavior
  • bool [ preset::Enable_Disable_Option ] — Enable

Returns — void

native void UnitXPGainEnable(
	unit inUnit,
	string inBehavior,
	bool inEnable,
);

Category: Unit / Attributes And Experience

# Examples

# mods/heroesdata.stormmod

StartingExperienceLib.galaxy

// L1290
UnitXPGainEnable(libGame_gv_players[lv_indexPlayer].lv_heroUnit, null, true)