# Convert Integer To Conversation State Index

Grammar — Conversation State Index(state, index)
FlagsNative | Function

Returns the conversation state index for the given conversation state and integer index.

# Arguments

  • string<gamelink::ConversationState> — State
  • int — Index

Returns — string<convstateindex>

native string ConversationDataStateIndex(
	string inStateId,
	int inIndex,
);

Category: Conversation / Conversation Tools

# Examples

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:3088

    autoFDA5092A_val = lp_status;
    if (autoFDA5092A_val == libCamp_ge_MissionStatus_Available) {
        ConversationDataStateSetValue(ConversationDataStateIndex("MissionAvailable", (lp_mission)), lp_age);
    }
    else if (autoFDA5092A_val == libCamp_ge_MissionStatus_Completed) {

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

    }
    else if (autoFDA5092A_val == libCamp_ge_MissionStatus_Completed) {
        ConversationDataStateSetValue(ConversationDataStateIndex("MissionCompleted", (lp_mission)), lp_age);
    }
    else {

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

        lv_indexMission = libCamp_gv_tS_MapID[auto32A829D7_i];
        if ((lv_indexMission == lp_mission)) {
            ConversationDataStateSetValue(ConversationDataStateIndex("MissionLast", (lv_indexMission)), 1);
        }
        else {

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

        }
        else {
            ConversationDataStateSetValue(ConversationDataStateIndex("MissionLast", (lv_indexMission)), 0);
        }
        auto32A829D7_i = auto32A829D7_i + 1;

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:3795

        lv_index = 1;
        for ( ; ( (auto6F10283C_ai >= 0 && lv_index <= auto6F10283C_ae) || (auto6F10283C_ai < 0 && lv_index >= auto6F10283C_ae) ) ; lv_index += auto6F10283C_ai ) {
            ConversationDataRegisterCamera(ConversationDataStateIndex("Cameras", lv_index), libVoiC_gf_PC_ClickableConversationLink(lv_indexClickable), null, libVCST_gt_PS_ConversationCameraApply, true);
        }
        auto83C0223C_ai = auto83C0223C_ai+1;

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

        for ( ; ( (auto68A62B65_ai >= 0 && lv_index <= auto68A62B65_ae) || (auto68A62B65_ai < 0 && lv_index >= auto68A62B65_ae) ) ; lv_index += auto68A62B65_ai ) {
            if ((libVCST_gf_NextAvailableMission(libVoiC_gf_CurrentLocation()) == "PMoebius01")) {
                ConversationDataRegisterCamera(ConversationDataStateIndex("Cameras", lv_index), "char_Smith", null, libVCUI_gt_PU_ArtanisAnim, true);
            }
            else {

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

            }
            else {
                ConversationDataRegisterCamera(ConversationDataStateIndex("Cameras", lv_index), "char_Artanis", null, libVCUI_gt_PU_ArtanisAnim, true);
                ConversationDataRegisterCamera(ConversationDataStateIndex("Cameras", lv_index), "char_DTLeader", null, libVCUI_gt_PU_ArtanisAnimStop, true);
            }

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

            else {
                ConversationDataRegisterCamera(ConversationDataStateIndex("Cameras", lv_index), "char_Artanis", null, libVCUI_gt_PU_ArtanisAnim, true);
                ConversationDataRegisterCamera(ConversationDataStateIndex("Cameras", lv_index), "char_DTLeader", null, libVCUI_gt_PU_ArtanisAnimStop, true);
            }
        }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:3264

        lv_index = 1;
        for ( ; ( (auto6F10283C_ai >= 0 && lv_index <= auto6F10283C_ae) || (auto6F10283C_ai <= 0 && lv_index >= auto6F10283C_ae) ) ; lv_index += auto6F10283C_ai ) {
            ConversationDataRegisterCamera(ConversationDataStateIndex("Cameras", lv_index), libNovC_gf_NC_ClickableConversationLink(lv_indexClickable), null, libNCST_gt_NS_ConversationCameraApply, true);
        }
        auto83C0223C_ai = auto83C0223C_ai+1;