# Unit Gains Experience Level

Grammaru gains an experience level
FlagsNative | Event

This event fires when a unit gains an experience level. Use “Triggering Behavior” to get the behavior. Use “Triggering Player” to get the owner of the unit that gained a level. Use “Triggering Unit” to get the unit that gained a level.

# Arguments

  • unitref<unit> — Unit

Returns — void

native void TriggerAddEventUnitGainLevel(
	trigger t,
	unitref u,
);

# Event parameters

Category: Unit / Attributes And Experience

# Examples

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmap/MapScript.galaxy:3103

void gt_LevelUpQ_Init () {
    gt_LevelUpQ = TriggerCreate("gt_LevelUpQ_Func");
    TriggerAddEventUnitGainLevel(gt_LevelUpQ, UnitRefFromVariable("gv_heroPlayer"));
}

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmap/MapScript.galaxy:4309

    gt_Level10gained = TriggerCreate("gt_Level10gained_Func");
    TriggerEnable(gt_Level10gained, false);
    TriggerAddEventUnitGainLevel(gt_Level10gained, UnitRefFromVariable("gv_heroPlayer"));
}

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmap/MapScript.galaxy:1336

void gt_LevelUpStartMapEvent_Init () {
    gt_LevelUpStartMapEvent = TriggerCreate("gt_LevelUpStartMapEvent_Func");
    TriggerAddEventUnitGainLevel(gt_LevelUpStartMapEvent, UnitRefFromVariable("gv_heroPlayer"));
}

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap/MapScript.galaxy:5245

    gt__1E_RoamingLevelMonitor = TriggerCreate("gt__1E_RoamingLevelMonitor_Func");
    TriggerEnable(gt__1E_RoamingLevelMonitor, false);
    TriggerAddEventUnitGainLevel(gt__1E_RoamingLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_PlayerUnit"));
    TriggerAddEventUnitGainLevel(gt__1E_RoamingLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_EnemyGreymane"));
}

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap/MapScript.galaxy:5246

    TriggerEnable(gt__1E_RoamingLevelMonitor, false);
    TriggerAddEventUnitGainLevel(gt__1E_RoamingLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_PlayerUnit"));
    TriggerAddEventUnitGainLevel(gt__1E_RoamingLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_EnemyGreymane"));
}

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap/MapScript.galaxy:5833

    gt__1E_RoamingTeamLevelUpLabel = TriggerCreate("gt__1E_RoamingTeamLevelUpLabel_Func");
    TriggerEnable(gt__1E_RoamingTeamLevelUpLabel, false);
    TriggerAddEventUnitGainLevel(gt__1E_RoamingTeamLevelUpLabel, null);
}

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap/MapScript.galaxy:6864

    gt__2B_SoakLanesLevelMonitor = TriggerCreate("gt__2B_SoakLanesLevelMonitor_Func");
    TriggerEnable(gt__2B_SoakLanesLevelMonitor, false);
    TriggerAddEventUnitGainLevel(gt__2B_SoakLanesLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_PlayerUnit"));
    TriggerAddEventUnitGainLevel(gt__2B_SoakLanesLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_EnemyFalstad"));
}

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap/MapScript.galaxy:6865

    TriggerEnable(gt__2B_SoakLanesLevelMonitor, false);
    TriggerAddEventUnitGainLevel(gt__2B_SoakLanesLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_PlayerUnit"));
    TriggerAddEventUnitGainLevel(gt__2B_SoakLanesLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_EnemyFalstad"));
}

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmapMapScript.galaxy:3103

void gt_LevelUpQ_Init () {
    gt_LevelUpQ = TriggerCreate("gt_LevelUpQ_Func");
    TriggerAddEventUnitGainLevel(gt_LevelUpQ, UnitRefFromVariable("gv_heroPlayer"));
}

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorial01.stormmapMapScript.galaxy:4309

    gt_Level10gained = TriggerCreate("gt_Level10gained_Func");
    TriggerEnable(gt_Level10gained, false);
    TriggerAddEventUnitGainLevel(gt_Level10gained, UnitRefFromVariable("gv_heroPlayer"));
}

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialmapmechanics.stormmapMapScript.galaxy:1336

void gt_LevelUpStartMapEvent_Init () {
    gt_LevelUpStartMapEvent = TriggerCreate("gt_LevelUpStartMapEvent_Func");
    TriggerAddEventUnitGainLevel(gt_LevelUpStartMapEvent, UnitRefFromVariable("gv_heroPlayer"));
}

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmapMapScript.galaxy:5245

    gt__1E_RoamingLevelMonitor = TriggerCreate("gt__1E_RoamingLevelMonitor_Func");
    TriggerEnable(gt__1E_RoamingLevelMonitor, false);
    TriggerAddEventUnitGainLevel(gt__1E_RoamingLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_PlayerUnit"));
    TriggerAddEventUnitGainLevel(gt__1E_RoamingLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_EnemyGreymane"));
}

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmapMapScript.galaxy:5246

    TriggerEnable(gt__1E_RoamingLevelMonitor, false);
    TriggerAddEventUnitGainLevel(gt__1E_RoamingLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_PlayerUnit"));
    TriggerAddEventUnitGainLevel(gt__1E_RoamingLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_EnemyGreymane"));
}

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmapMapScript.galaxy:5833

    gt__1E_RoamingTeamLevelUpLabel = TriggerCreate("gt__1E_RoamingTeamLevelUpLabel_Func");
    TriggerEnable(gt__1E_RoamingTeamLevelUpLabel, false);
    TriggerAddEventUnitGainLevel(gt__1E_RoamingTeamLevelUpLabel, null);
}

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmapMapScript.galaxy:6864

    gt__2B_SoakLanesLevelMonitor = TriggerCreate("gt__2B_SoakLanesLevelMonitor_Func");
    TriggerEnable(gt__2B_SoakLanesLevelMonitor, false);
    TriggerAddEventUnitGainLevel(gt__2B_SoakLanesLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_PlayerUnit"));
    TriggerAddEventUnitGainLevel(gt__2B_SoakLanesLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_EnemyFalstad"));
}

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmapMapScript.galaxy:6865

    TriggerEnable(gt__2B_SoakLanesLevelMonitor, false);
    TriggerAddEventUnitGainLevel(gt__2B_SoakLanesLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_PlayerUnit"));
    TriggerAddEventUnitGainLevel(gt__2B_SoakLanesLevelMonitor, UnitRefFromVariable("libStEx_gv_hERO_EnemyFalstad"));
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:19355

void libGame_gt_LevelUp_Init () {
    libGame_gt_LevelUp = TriggerCreate("libGame_gt_LevelUp_Func");
    TriggerAddEventUnitGainLevel(libGame_gt_LevelUp, null);
}

mods/heromods/zarya.stormmodbase.stormdata/LibHZAR.galaxy:1134

    libHZAR_gt_HeroZaryaRefreshConversionRates = TriggerCreate("libHZAR_gt_HeroZaryaRefreshConversionRates_Func");
    TriggerEnable(libHZAR_gt_HeroZaryaRefreshConversionRates, false);
    TriggerAddEventUnitGainLevel(libHZAR_gt_HeroZaryaRefreshConversionRates, null);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:17788

    libCOMI_gt_CM_Dehaka_LevelUp_Stage2_ColossusLegs = TriggerCreate("libCOMI_gt_CM_Dehaka_LevelUp_Stage2_ColossusLegs_Func");
    TriggerEnable(libCOMI_gt_CM_Dehaka_LevelUp_Stage2_ColossusLegs, false);
    TriggerAddEventUnitGainLevel(libCOMI_gt_CM_Dehaka_LevelUp_Stage2_ColossusLegs, null);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:17835

    libCOMI_gt_CM_Dehaka_LevelUp_Stage3 = TriggerCreate("libCOMI_gt_CM_Dehaka_LevelUp_Stage3_Func");
    TriggerEnable(libCOMI_gt_CM_Dehaka_LevelUp_Stage3, false);
    TriggerAddEventUnitGainLevel(libCOMI_gt_CM_Dehaka_LevelUp_Stage3, null);
}

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:31769

    libCOMI_gt_CM_AbilityTransmissionDehakaChangeReminderLevel = TriggerCreate("libCOMI_gt_CM_AbilityTransmissionDehakaChangeReminderLevel_Func");
    TriggerEnable(libCOMI_gt_CM_AbilityTransmissionDehakaChangeReminderLevel, false);
    TriggerAddEventUnitGainLevel(libCOMI_gt_CM_AbilityTransmissionDehakaChangeReminderLevel, null);
}

mods/warcoop/warclassic.sc2modbase.sc2data/TriggerLibs/WarClassic.galaxy:832

    libGAw3_gt_EVENT_PLAYER_HERO_LEVEL = TriggerCreate("libGAw3_gt_EVENT_PLAYER_HERO_LEVEL_Func");
    TriggerEnable(libGAw3_gt_EVENT_PLAYER_HERO_LEVEL, false);
    TriggerAddEventUnitGainLevel(libGAw3_gt_EVENT_PLAYER_HERO_LEVEL, null);
}

mods/warcoop/warcoopdata.sc2modbase.sc2data/TriggerLibs/WarCoopData.galaxy:4003

void libWCdr_gt_HeroLevelsUp_Init () {
    libWCdr_gt_HeroLevelsUp = TriggerCreate("libWCdr_gt_HeroLevelsUp_Func");
    TriggerAddEventUnitGainLevel(libWCdr_gt_HeroLevelsUp, null);
}