# Value From Data Table (Sound)

Grammarname from the scope|Global/Local data table
FlagsNative | Function

Returns a sound value from a data table. Data tables allow you to store and recall values using a string identifier.

# Arguments

  • bool<preset::DataScope> — Scope
  • string — Name

Returns — sound

native sound DataTableGetSound(bool global, string name);

Category: Data Table / Load Value

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:337

    // Implementation
    while ((libVCMI_gv_pM_SoundDataTableIndex > 0)) {
        SoundStop(DataTableGetSound(true, libVCMI_gf_PM_SoundDataTableName()), true);
        libVCMI_gv_pM_SoundDataTableIndex -= 1;
    }

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

    // Automatic Variable Declarations
    // Implementation
    return DataTableGetSound(false, TriggerEventParamName(libGame_gv_eventID_AnnouncerVOInitiated_C, libGame_gv_eventParam_Sound_C));
}

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:1796

    // Implementation
    while ((libNCMI_gv_NM_SoundDataTableIndex > 0)) {
        SoundStop(DataTableGetSound(true, libNCMI_gf_NM_SoundDataTableName()), true);
        libNCMI_gv_NM_SoundDataTableIndex -= 1;
    }

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

    // Implementation
    while ((libCOMI_gv_cM_SoundDataTableIndex > 0)) {
        SoundStop(DataTableGetSound(true, libCOMI_gf_CM_SoundDataTableName()), true);
        libCOMI_gv_cM_SoundDataTableIndex -= 1;
    }