# Preload Sound

Grammar — Preload file|Sound File queue|Immediately/For Next Map
FlagsNative | Action

Preloads a sound file. The file must be explicitly identified (it won’t work if you plug in a variable to that parameter). Preloading will force an asset or data entry to be loaded into memory before the map starts, rather than be loaded on demand as the map runs.

# Arguments

  • string [ filepath ] — File
  • bool [ preset::PreloadQueue ] — Queue

Returns — void

native void PreloadSound(string path, bool queue);

Category: Game / Preloading

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L32274
PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingValerian00004.wav", false)
// L32276
PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingTychus00009.wav", false)
// L398
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_Attack02.ogg", false)
// L399
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_Attack04.ogg", false)
// L400
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_Attack05.ogg", false)
// L401
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_Pissed01.ogg", false)
// L402
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_What02.ogg", false)
// L403
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_What03.ogg", false)
// L32274
PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingValerian00004.wav", false)
// L32276
PreloadSound("LocalizedData\\Sounds\\TerranVO\\CampaignVO\\TTychus05BriefingTychus00009.wav", false)
// L398
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_Attack02.ogg", false)
// L399
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_Attack04.ogg", false)
// L400
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_Attack05.ogg", false)
// L401
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_Pissed01.ogg", false)
// L402
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_What02.ogg", false)
// L403
PreloadSound("LocalizedData\\Sounds\\TerranUnitVO\\Reaper\\Reaper_What03.ogg", false)
// L905
PreloadSound("Assets\\Sounds\\Uni\\UI\\UI_Ping.wav", false)
// L905
PreloadSound("Assets\\Sounds\\Uni\\UI\\UI_Ping.wav", false)
// L4953
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova02_JessicaHall_002.ogg", false)
// L4954
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova02_Horner_006.ogg", false)
// L4955
PreloadSound("LocalizedData\\Sounds\\VO\\Mission_Nova02_Horner_076.ogg", false)
// L4956
PreloadSound("LocalizedData\\Sounds\\VO\\Mission_Nova02_Horner_121.ogg", false)
// L4957
PreloadSound("LocalizedData\\Sounds\\VO\\Mission_Nova02_Nova_077.ogg", false)
// L4958
PreloadSound("LocalizedData\\Sounds\\VO\\Mission_Nova02_Horner_078.ogg", false)
// L8714
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Nova_001.ogg", false)
// L8715
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Nova_004.ogg", false)
// L8716
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Nova_005.ogg", false)
// L8717
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Nova_007.ogg", false)
// L8718
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Reigel_002.ogg", false)
// L8719
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Reigel_003.ogg", false)
// L8720
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Reigel_006.ogg", false)
// L8721
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Reigel_008.ogg", false)
// L9460
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_003.ogg", false)
// L9461
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_004.ogg", false)
// L9462
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_007.ogg", false)
// L9463
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_012.ogg", false)
// L9464
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_015.ogg", false)
// L9465
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_017.ogg", false)
// L9466
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_018.ogg", false)
// L9467
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Reigel_001.ogg", false)
// L9468
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Reigel_005.ogg", false)
// L9469
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Reigel_009.ogg", false)
// L5188
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova06_Reigel_019.ogg", false)
// L5189
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova06_Nova_020.ogg", false)
// L4953
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova02_JessicaHall_002.ogg", false)
// L4954
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova02_Horner_006.ogg", false)
// L4955
PreloadSound("LocalizedData\\Sounds\\VO\\Mission_Nova02_Horner_076.ogg", false)
// L4956
PreloadSound("LocalizedData\\Sounds\\VO\\Mission_Nova02_Horner_121.ogg", false)
// L4957
PreloadSound("LocalizedData\\Sounds\\VO\\Mission_Nova02_Nova_077.ogg", false)
// L4958
PreloadSound("LocalizedData\\Sounds\\VO\\Mission_Nova02_Horner_078.ogg", false)
// L8714
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Nova_001.ogg", false)
// L8715
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Nova_004.ogg", false)
// L8716
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Nova_005.ogg", false)
// L8717
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Nova_007.ogg", false)
// L8718
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Reigel_002.ogg", false)
// L8719
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Reigel_003.ogg", false)
// L8720
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Reigel_006.ogg", false)
// L8721
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova03_Reigel_008.ogg", false)
// L9460
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_003.ogg", false)
// L9461
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_004.ogg", false)
// L9462
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_007.ogg", false)
// L9463
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_012.ogg", false)
// L9464
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_015.ogg", false)
// L9465
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_017.ogg", false)
// L9466
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Nova_018.ogg", false)
// L9467
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Reigel_001.ogg", false)
// L9468
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Reigel_005.ogg", false)
// L9469
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova05_Reigel_009.ogg", false)
// L5188
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova06_Reigel_019.ogg", false)
// L5189
PreloadSound("LocalizedData\\Sounds\\VO\\Briefing_Nova06_Nova_020.ogg", false)