# Set Dialog Item Achievement

Grammar — Set dialogItem achievement to achievement for players
FlagsAction

Sets an achievement for the specified dialog item.

# Arguments

  • int<control> — Dialog Item
  • string<gamelink::Achievement> — Achievement
  • playergroup — Players

Returns — void

void libNtve_gf_SetDialogItemAchievement(
	int lp_dialogItem,
	string lp_achievement,
	playergroup lp_players,
);

Category: Dialog / Dialog Item Tools

# Examples

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:14394

    lv_index = 1;
    for ( ; ( (auto4C56664E_ai >= 0 && lv_index <= auto4C56664E_ae) || (auto4C56664E_ai < 0 && lv_index >= auto4C56664E_ae) ) ; lv_index += auto4C56664E_ai ) {
        libNtve_gf_SetDialogItemAchievement(libSwaC_gv_zS_VSAchievementTitle2[lv_index], UserDataGetGameLink("Maps", libSwaC_gf_ZS_MapUserDataInstance(lp_mission), "Achievements", lv_index), PlayerGroupAll());
    }
    if (((libSwaC_gf_CurrentMap() == "ZZerus1") || (libSwaC_gf_CurrentMap() == "ZZerus3"))) {

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:950

            lv_index = 1;
            for ( ; ( (auto996933DC_ai >= 0 && lv_index <= auto996933DC_ae) || (auto996933DC_ai <= 0 && lv_index >= auto996933DC_ae) ) ; lv_index += auto996933DC_ai ) {
                libNtve_gf_SetDialogItemAchievement(lib281DEC45_gv_zSS_UIArchivesAchievements[lv_index], UserDataGetGameLink("Maps", lib281DEC45_gf_ZS_MapUserDataInstance(lv_mission), "Achievements", lv_index), PlayerGroupAll());
            }
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:1523

            lv_index = 1;
            for ( ; ( (auto9C012B84_ai >= 0 && lv_index <= auto9C012B84_ae) || (auto9C012B84_ai < 0 && lv_index >= auto9C012B84_ae) ) ; lv_index += auto9C012B84_ai ) {
                libNtve_gf_SetDialogItemAchievement(libVCUI_gv_pU_ArchivesAchievements[lv_index], UserDataGetGameLink("Maps", libVoiC_gf_PC_MapUserDataInstance(lv_selectedMission), "Achievements", lv_index), PlayerGroupAll());
            }
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:1958

    for ( ; ( (autoD4BA0498_ai >= 0 && lv_achievementIndex <= autoD4BA0498_ae) || (autoD4BA0498_ai < 0 && lv_achievementIndex >= autoD4BA0498_ae) ) ; lv_achievementIndex += autoD4BA0498_ai ) {
        if ((libVCUI_gv_pU_MissionAchievementFrame[lv_achievementIndex] != c_invalidDialogControlId)) {
            libNtve_gf_SetDialogItemAchievement(libVCUI_gv_pU_MissionAchievementFrame[lv_achievementIndex], UserDataGetGameLink("Maps", libVoiC_gf_PC_MapUserDataInstance(libVCUI_gv_pU_MissionNextMap), "Achievements", lv_achievementIndex), PlayerGroupAll());
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:5453

    lv_index = 1;
    for ( ; ( (autoE51A1D67_ai >= 0 && lv_index <= autoE51A1D67_ae) || (autoE51A1D67_ai < 0 && lv_index >= autoE51A1D67_ae) ) ; lv_index += autoE51A1D67_ai ) {
        libNtve_gf_SetDialogItemAchievement(libVCUI_gv_zS_VSAchievementTitle2[lv_index], UserDataGetGameLink("Maps", libVoiC_gf_PC_MapUserDataInstance(lp_mission), "Achievements", lv_index), PlayerGroupAll());
    }
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:5708

    lv_index = 1;
    for ( ; ( (autoD4D88451_ai >= 0 && lv_index <= autoD4D88451_ae) || (autoD4D88451_ai < 0 && lv_index >= autoD4D88451_ae) ) ; lv_index += autoD4D88451_ai ) {
        libNtve_gf_SetDialogItemAchievement(libVCUI_gv_zS_VSAchievementTitle2[lv_index], UserDataGetGameLink("Maps", libVoiC_gf_PC_MapUserDataInstance(lp_mission), "Achievements", lv_index), PlayerGroupAll());
    }
}

mods/challenges.sc2modbase.sc2data/LibChal.galaxy:931

        else {
        }
        libNtve_gf_SetDialogItemAchievement(libChal_gv_cHL_VPAchievePanelAchievements[lv_index], libChal_gv_cHL_VictoryPanelAchievements[lv_index], PlayerGroupAll());
        DialogControlSetPositionRelative(libChal_gv_cHL_VPAchievePanelAchievements[lv_index], PlayerGroupAll(), c_anchorTop, libChal_gv_cHL_VPAchievePanelBGImage, c_anchorTop, 0, libChal_gv_cHL_VPAchievePanelHeight);
        libChal_gv_cHL_VPAchievePanelHeight += (libChal_gv_cHLC_VICTORYPANELACHIEVEPANELITEM_HEIGHT + 0);

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:2591

    DialogControlSetPosition(lv_dialogitem, PlayerGroupAll(), lp_anchor, lp_offsetX, lp_offsetY);
    libNtve_gf_SetDialogItemTooltip(lv_dialogitem, lp_tooltip, PlayerGroupAll());
    libNtve_gf_SetDialogItemAchievement(lv_dialogitem, lp_achievement, PlayerGroupAll());
    return lv_dialogitem;
}

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:2044

    DialogControlSetPosition(lv_dialogitem, PlayerGroupAll(), lp_anchor, lp_offsetX, lp_offsetY);
    libNtve_gf_SetDialogItemTooltip(lv_dialogitem, lp_tooltip, PlayerGroupAll());
    libNtve_gf_SetDialogItemAchievement(lv_dialogitem, lp_achievement, PlayerGroupAll());
    return lv_dialogitem;
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:651

            lv_index = 1;
            for ( ; ( (auto9C012B84_ai >= 0 && lv_index <= auto9C012B84_ae) || (auto9C012B84_ai <= 0 && lv_index >= auto9C012B84_ae) ) ; lv_index += auto9C012B84_ai ) {
                libNtve_gf_SetDialogItemAchievement(libNCUI_gv_nU_ArchivesAchievements[lv_index], UserDataGetGameLink("Maps", libComC_gf_CC_MapUserDataInstance(lv_selectedMission), "Achievements", lv_index), PlayerGroupAll());
            }
        }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:1316

    for ( ; ( (autoD4BA0498_ai >= 0 && lv_achievementIndex <= autoD4BA0498_ae) || (autoD4BA0498_ai <= 0 && lv_achievementIndex >= autoD4BA0498_ae) ) ; lv_achievementIndex += autoD4BA0498_ai ) {
        if ((libNCUI_gv_NU_MissionAchievementFrame[lv_achievementIndex] != c_invalidDialogControlId)) {
            libNtve_gf_SetDialogItemAchievement(libNCUI_gv_NU_MissionAchievementFrame[lv_achievementIndex], UserDataGetGameLink("Maps", libComC_gf_CC_MapUserDataInstance(libNCUI_gf_NU_NextAvailableMission()), "Achievements", lv_achievementIndex), PlayerGroupAll());
        }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCUI.galaxy:3962

    lv_index = 1;
    for ( ; ( (autoD4D88451_ai >= 0 && lv_index <= autoD4D88451_ae) || (autoD4D88451_ai <= 0 && lv_index >= autoD4D88451_ae) ) ; lv_index += autoD4D88451_ai ) {
        libNtve_gf_SetDialogItemAchievement(libNCUI_gv_zS_VSAchievementTitle2[lv_index], UserDataGetGameLink("Maps", libComC_gf_CC_MapUserDataInstance(lp_mission), "Achievements", lv_index), PlayerGroupAll());
    }
}

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:6844

    lv_indexAchievement = 1;
    for ( ; ( (autoB100C658_ai >= 0 && lv_indexAchievement <= autoB100C658_ae) || (autoB100C658_ai < 0 && lv_indexAchievement >= autoB100C658_ae) ) ; lv_indexAchievement += autoB100C658_ai ) {
        libNtve_gf_SetDialogItemAchievement(libA3DDD02B_gv_pP_MLAchievements[lv_indexAchievement], UserDataGetGameLink("Maps", libA3DDD02B_gf_PP_MapUserDataInstance(lp_mission), "Achievements", lv_indexAchievement), PlayerGroupAll());
    }
    ConversationDataRegisterPortrait("char_RescuedTemplar", PortraitGetTriggerControl(libA3DDD02B_gv_pP_MLContactPortrait));

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:7137

    lv_index = 1;
    for ( ; ( (autoCDC346B5_ai >= 0 && lv_index <= autoCDC346B5_ae) || (autoCDC346B5_ai < 0 && lv_index >= autoCDC346B5_ae) ) ; lv_index += autoCDC346B5_ai ) {
        libNtve_gf_SetDialogItemAchievement(libA3DDD02B_gv_zS_VSAchievementTitle2[lv_index], UserDataGetGameLink("Maps", libA3DDD02B_gf_PP_MapUserDataInstance(lp_mission), "Achievements", lv_index), PlayerGroupAll());
    }
}

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:7362

        lv_index = 1;
        for ( ; ( (autoA93C12E8_ai >= 0 && lv_index <= autoA93C12E8_ae) || (autoA93C12E8_ai < 0 && lv_index >= autoA93C12E8_ae) ) ; lv_index += autoA93C12E8_ai ) {
            libNtve_gf_SetDialogItemAchievement(libA3DDD02B_gv_pP_ArchivesAchievements[lv_index], UserDataGetGameLink("Maps", libA3DDD02B_gf_PP_MapUserDataInstance(lv_selectedMission), "Achievements", lv_index), PlayerGroupAll());
        }
    }