# Data Conversation State

Grammar — Conversation stateIndex|State
FlagsNative | Function

Converts a conversation state index to an integer.

# Arguments

  • string<convstateindex> — State Index

Returns — int

native int ConversationDataStateGetValue(
	string stateIndex,
);

Category: Conversation / Data Conversation Tools

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:4083

    VisRevealArea(gv_p1_USER, RegionEntireMap(), 0.0, false);
    VisRevealArea(gv_p2_ENEMY, RegionEntireMap(), 0.0, false);
    gv_highScore = ConversationDataStateGetValue("ArcadeGameVariables|HiScore");
    gf_InitCamera();
    gf_PrepareBorder();

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:9523

void gf_AddFlashingTextTagToHotspot (unit lp_unit, string lp_conversationStateIndex, int lp_offsetX, int lp_offsetY, int lp_edgeOffsetX, int lp_edgeOffsetY) {
    // Implementation
    if ((ConversationDataStateGetValue(lp_conversationStateIndex) == 1)) {
        return ;
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10573

    gf_ZPlanetPanelSetPitchButtonState(c_planetPanelContactButtonStatePlay);
    CinematicFade(true, 0.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
    if ((ConversationDataStateGetValue(libCamp_gf_MissionPitches(gv_zPlanetPanel_Mission)) == 0)) {
        gf_ZPlanetPanelPitch();
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10752

    libCamp_gf_AddRoomChangePanelButton(StringExternal("Param/Value/B0EC18CF"), gt_CharRoomUIButtonResponse, gt_CharRoomUIButtonUpdate, (ge_CharRoomUI_CharRoomUIMercenaries), StringToText(""));
    libCamp_gf_AddRoomChangePanelButton(StringExternal("Param/Value/40C21185"), gt_CharRoomUIButtonResponse, gt_CharRoomUIButtonUpdate, (ge_CharRoomUI_CharRoomUINews), StringToText(""));
    if ((ConversationDataStateGetValue("Hotspots|CantinaTV") == 0)) {
        libCamp_gf_FlashRoomChangePanelButton(libCamp_gf_LastAddRoomChangePanelButton());
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:12693

        autoD33241BE_val = lp_scene;
        if (autoD33241BE_val == libCamp_ge_SceneID_SceneTerran07BarFight) {
            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyHanson03A") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHansonA);
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:12697

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyHanson03B") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHansonB);
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:12701

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyTosh03A") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyToshA);
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:12705

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyTosh03B") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyToshB);
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:12709

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyHorner") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHorner);
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:12715

        }
        else if (autoD33241BE_val == libCamp_ge_SceneID_SceneTerran10RaynorsDream) {
            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran10TrophyHanson03A") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHansonA);
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:12719

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran10TrophyHanson03B") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHansonB);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:4083

    VisRevealArea(gv_p1_USER, RegionEntireMap(), 0.0, false);
    VisRevealArea(gv_p2_ENEMY, RegionEntireMap(), 0.0, false);
    gv_highScore = ConversationDataStateGetValue("ArcadeGameVariables|HiScore");
    gf_InitCamera();
    gf_PrepareBorder();

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:9523

void gf_AddFlashingTextTagToHotspot (unit lp_unit, string lp_conversationStateIndex, int lp_offsetX, int lp_offsetY, int lp_edgeOffsetX, int lp_edgeOffsetY) {
    // Implementation
    if ((ConversationDataStateGetValue(lp_conversationStateIndex) == 1)) {
        return ;
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10573

    gf_ZPlanetPanelSetPitchButtonState(c_planetPanelContactButtonStatePlay);
    CinematicFade(true, 0.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
    if ((ConversationDataStateGetValue(libCamp_gf_MissionPitches(gv_zPlanetPanel_Mission)) == 0)) {
        gf_ZPlanetPanelPitch();
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10752

    libCamp_gf_AddRoomChangePanelButton(StringExternal("Param/Value/B0EC18CF"), gt_CharRoomUIButtonResponse, gt_CharRoomUIButtonUpdate, (ge_CharRoomUI_CharRoomUIMercenaries), StringToText(""));
    libCamp_gf_AddRoomChangePanelButton(StringExternal("Param/Value/40C21185"), gt_CharRoomUIButtonResponse, gt_CharRoomUIButtonUpdate, (ge_CharRoomUI_CharRoomUINews), StringToText(""));
    if ((ConversationDataStateGetValue("Hotspots|CantinaTV") == 0)) {
        libCamp_gf_FlashRoomChangePanelButton(libCamp_gf_LastAddRoomChangePanelButton());
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:12693

        autoD33241BE_val = lp_scene;
        if (autoD33241BE_val == libCamp_ge_SceneID_SceneTerran07BarFight) {
            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyHanson03A") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHansonA);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:12697

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyHanson03B") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHansonB);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:12701

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyTosh03A") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyToshA);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:12705

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyTosh03B") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyToshB);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:12709

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran07TrophyHorner") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHorner);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:12715

        }
        else if (autoD33241BE_val == libCamp_ge_SceneID_SceneTerran10RaynorsDream) {
            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran10TrophyHanson03A") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHansonA);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:12719

            }

            if ((ConversationDataStateGetValue("SceneExtraObjects|Terran10TrophyHanson03B") > 0)) {
                UnitGroupAdd(lv_group, gv_cantinaTrophyHansonB);
            }

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:670


    // Implementation
    if ((libCamp_gf_NumberOfMissions(libCamp_ge_MissionCountOptions_Completed) == 9) && (ConversationDataStateGetValue("StoryTips|KeyboardShortcuts") == 0)) {
        ConversationDataStateSetValue("StoryTips|KeyboardShortcuts", 1);
        libCamp_gf_CreateTipFromConversationState("StoryTips|KeyboardShortcuts", libNtve_ge_TipType_NormalTip, PlayerGroupAll());

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:749

    }

    if ((libCamp_gv_tS_UpgradeInfantry2 == true) && (ConversationDataStateGetValue("StoryTips|EngineeringBay2") == 0)) {
        libCamp_gf_CreateTipFromConversationState("StoryTips|EngineeringBay2", libNtve_ge_TipType_NormalTip, PlayerGroupAll());
        ConversationDataStateSetValue("StoryTips|EngineeringBay2", 1);

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:755

    }

    if ((libCamp_gv_tS_UpgradeInfantry3 == true) && (ConversationDataStateGetValue("StoryTips|EngineeringBay3") == 0)) {
        libCamp_gf_CreateTipFromConversationState("StoryTips|EngineeringBay3", libNtve_ge_TipType_NormalTip, PlayerGroupAll());
        ConversationDataStateSetValue("StoryTips|EngineeringBay3", 1);

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:761

    }

    if (((libCamp_gv_tS_UpgradeVehicle2 == true) || (libCamp_gv_tS_UpgradeShip2 == true)) && (ConversationDataStateGetValue("StoryTips|ArmoryLevel2") == 0)) {
        libCamp_gf_CreateTipFromConversationState("StoryTips|ArmoryLevel2", libNtve_ge_TipType_NormalTip, PlayerGroupAll());
        ConversationDataStateSetValue("StoryTips|ArmoryLevel2", 1);

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:767

    }

    if (((libCamp_gv_tS_UpgradeVehicle3 == true) || (libCamp_gv_tS_UpgradeShip3 == true)) && (ConversationDataStateGetValue("StoryTips|ArmoryLevel3") == 0)) {
        libCamp_gf_CreateTipFromConversationState("StoryTips|ArmoryLevel3", libNtve_ge_TipType_NormalTip, PlayerGroupAll());
        ConversationDataStateSetValue("StoryTips|ArmoryLevel3", 1);

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:2659

    while (auto06336F42_i <= libCamp_gv_TSC_MISSION_LAST) {
        lv_mission = libCamp_gv_tS_MapID[auto06336F42_i];
        if ((ConversationDataStateGetValue(ConversationDataStateIndex("MissionLast", (lv_mission))) == 1)) {
            return lv_mission;
        }

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:2741

    auto87D2C2FD_val = lp_status;
    if (auto87D2C2FD_val == libCamp_ge_MissionStatus_Available) {
        return ConversationDataStateGetValue(ConversationDataStateIndex("MissionAvailable", (lp_mission)));
    }
    else if (auto87D2C2FD_val == libCamp_ge_MissionStatus_Completed) {

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:2744

    }
    else if (auto87D2C2FD_val == libCamp_ge_MissionStatus_Completed) {
        return ConversationDataStateGetValue(ConversationDataStateIndex("MissionCompleted", (lp_mission)));
    }
    else {

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:4470

    // Automatic Variable Declarations
    // Implementation
    return ConversationDataStateGetValue(libCamp_gv_tS_MissionObjConvoID[(lp_objective)]);
}

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:6019

    // Automatic Variable Declarations
    // Implementation
    return ConversationDataStateGetValue(libCamp_gv_tS_StoryStateConvoID[(lp_stateID)]);
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryzerus.sc2map/MapScript.galaxy:449

    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "zSM_Zeratul", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    lib281DEC45_gf_PlayScriptedConversation("zSM_Zeratul", c_conversationSkipSimple, lib281DEC45_ge_SwarmStoryFadeStyle_FadeOutOnSkip | lib281DEC45_ge_SwarmStoryFadeStyle_FadeInAfter, null);
    if ((ConversationDataStateGetValue("GrantStoryAchievement|Judgment Day") == 1)) {
        lib281DEC45_gf_SetCharacterNew("Hotspot - Zerus - Void Seeker", false);
        libSwaC_gf_CampaignAwardAchievement("ZeratulDestination", 1);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryzerus.sc2mapMapScript.galaxy:449

    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryMusic, "zSM_Zeratul", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    lib281DEC45_gf_PlayScriptedConversation("zSM_Zeratul", c_conversationSkipSimple, lib281DEC45_ge_SwarmStoryFadeStyle_FadeOutOnSkip | lib281DEC45_ge_SwarmStoryFadeStyle_FadeInAfter, null);
    if ((ConversationDataStateGetValue("GrantStoryAchievement|Judgment Day") == 1)) {
        lib281DEC45_gf_SetCharacterNew("Hotspot - Zerus - Void Seeker", false);
        libSwaC_gf_CampaignAwardAchievement("ZeratulDestination", 1);

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

    autoA9CD1361_val = lp_character;
    if (autoA9CD1361_val == "Zagara") {
        if ((ConversationDataStateGetValue("GrantStoryAchievement|Visionary") == 1)) {
            libSwaC_gf_CampaignAwardAchievement("KerriganTeachesZagara", 1);
        }

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

            libSwaC_gf_CampaignAwardAchievement("KerriganTeachesZagara", 1);
        }
        else if ((ConversationDataStateGetValue("GrantStoryAchievement|RallyTroopsZagara") == 1)) {
            AchievementTermQuantitySet(1, "ZStory_Rally_Zagara", 1);
        }

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

    }
    else if (autoA9CD1361_val == "Evolution Master") {
        if ((ConversationDataStateGetValue("GrantStoryAchievement|FashionStatementEvo") == 1)) {
            AchievementTermQuantitySet(1, "ZStoryConversation_Abathur_NewLook", 1);
        }

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

            AchievementTermQuantitySet(1, "ZStoryConversation_Abathur_NewLook", 1);
        }
        else if ((ConversationDataStateGetValue("GrantStoryAchievement|RallyTroopsAbathur") == 1)) {
            AchievementTermQuantitySet(1, "ZStory_Rally_Abathur", 1);
        }

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

    }
    else if (autoA9CD1361_val == "Zerg Adjutant") {
        if ((ConversationDataStateGetValue("GrantStoryAchievement|FashionStatementIzsha") == 1)) {
            AchievementTermQuantitySet(1, "ZStoryConversation_Izsha_NewLook", 1);
        }

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

            AchievementTermQuantitySet(1, "ZStoryConversation_Izsha_NewLook", 1);
        }
        else if ((ConversationDataStateGetValue("GrantStoryAchievement|RallyTroopsIzsha") == 1)) {
            AchievementTermQuantitySet(1, "ZStory_Rally_Izsha", 1);
        }

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

    else if (autoA9CD1361_val == "Primal Ancient") {
        AchievementTermQuantitySet(1, "ZStoryConversation_AncientOne", 1);
        if ((ConversationDataStateGetValue("GrantStoryAchievement|FashionStatementZurvan") == 1)) {
            AchievementTermQuantitySet(1, "ZStoryConversation_Zurvan_NewLook", 1);
        }

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

    }
    else if (autoA9CD1361_val == "Stukov") {
        if ((ConversationDataStateGetValue("GrantStoryAchievement|Xelnaga Secrets") == 1)) {
            libSwaC_gf_CampaignAwardAchievement("SkygeirrLearnXelnagaPurpose", 1);
        }

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

            libSwaC_gf_CampaignAwardAchievement("SkygeirrLearnXelnagaPurpose", 1);
        }
        else if ((ConversationDataStateGetValue("GrantStoryAchievement|RallyTroopsStukov") == 1)) {
            AchievementTermQuantitySet(1, "ZStory_Rally_Stukov", 1);
        }

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

    }
    else if (autoA9CD1361_val == "Primal Advisor") {
        if ((ConversationDataStateGetValue("GrantStoryAchievement|RallyTroopsDehaka") == 1)) {
            AchievementTermQuantitySet(1, "ZStory_Rally_Dehaka", 1);
        }