# Preload Model
Grammar — Preload file|Model File queue|Immediately/For Next Map
Flags —Native
|Action
Preloads a model 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> — Filebool
<preset::PreloadQueue> — Queue
Returns — void
native void PreloadModel(string path, bool queue);
# Related
Category: Game / Preloading
- Preload Asset —
void
— PreloadAsset - Preload Image —
void
— PreloadImage - Preload Layout —
void
— PreloadLayout - Preload Model —
void
— PreloadModel - Preload Model Animation —
void
— libNtve_gf_PreloadModelAnimation - Preload Model Object —
void
— libNtve_gf_PreloadModelObject - Preload Movie —
void
— PreloadMovie - Preload Object —
void
— PreloadObject - Preload Scene —
void
— PreloadScene - Preload Script —
void
— PreloadScript - Preload Sound —
void
— PreloadSound - Preload Sound Object —
void
— libNtve_gf_PreloadSoundObject - Preload Soundtrack —
void
— libNtve_gf_PreloadSoundtrack - Preload Unit —
void
— libNtve_gf_PreloadUnit
# Examples
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:990
GameTimeOfDaySet("08:00:00");
PreloadModel("Assets\\Units\\Protoss\\PurifierMatrix\\PurifierMatrix.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossLargeUnitDeath\\ProtossLargeUnitDeath.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:991
GameTimeOfDaySet("08:00:00");
PreloadModel("Assets\\Units\\Protoss\\PurifierMatrix\\PurifierMatrix.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossLargeUnitDeath\\ProtossLargeUnitDeath.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
PreloadModel("Assets\\Doodads\\THorner05SElectricalArcs\\THorner05SElectricalArcs.m3", false);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:992
PreloadModel("Assets\\Units\\Protoss\\PurifierMatrix\\PurifierMatrix.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossLargeUnitDeath\\ProtossLargeUnitDeath.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
PreloadModel("Assets\\Doodads\\THorner05SElectricalArcs\\THorner05SElectricalArcs.m3", false);
PreloadModel("Assets\\Doodads\\TempleStoneInlay\\TempleStoneInlay.m3", false);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:993
PreloadModel("Assets\\Effects\\Protoss\\ProtossLargeUnitDeath\\ProtossLargeUnitDeath.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
PreloadModel("Assets\\Doodads\\THorner05SElectricalArcs\\THorner05SElectricalArcs.m3", false);
PreloadModel("Assets\\Doodads\\TempleStoneInlay\\TempleStoneInlay.m3", false);
PreloadImage("Assets\\Textures\\shakurasex1_cliff1.dds", false);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pshakuras02.sc2map/MapScript.galaxy:994
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
PreloadModel("Assets\\Doodads\\THorner05SElectricalArcs\\THorner05SElectricalArcs.m3", false);
PreloadModel("Assets\\Doodads\\TempleStoneInlay\\TempleStoneInlay.m3", false);
PreloadImage("Assets\\Textures\\shakurasex1_cliff1.dds", false);
PreloadImage("Assets\\Textures\\shakurasex1_cliff1_specular.dds", false);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:990
GameTimeOfDaySet("08:00:00");
PreloadModel("Assets\\Units\\Protoss\\PurifierMatrix\\PurifierMatrix.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossLargeUnitDeath\\ProtossLargeUnitDeath.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:991
GameTimeOfDaySet("08:00:00");
PreloadModel("Assets\\Units\\Protoss\\PurifierMatrix\\PurifierMatrix.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossLargeUnitDeath\\ProtossLargeUnitDeath.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
PreloadModel("Assets\\Doodads\\THorner05SElectricalArcs\\THorner05SElectricalArcs.m3", false);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:992
PreloadModel("Assets\\Units\\Protoss\\PurifierMatrix\\PurifierMatrix.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossLargeUnitDeath\\ProtossLargeUnitDeath.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
PreloadModel("Assets\\Doodads\\THorner05SElectricalArcs\\THorner05SElectricalArcs.m3", false);
PreloadModel("Assets\\Doodads\\TempleStoneInlay\\TempleStoneInlay.m3", false);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:993
PreloadModel("Assets\\Effects\\Protoss\\ProtossLargeUnitDeath\\ProtossLargeUnitDeath.m3", false);
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
PreloadModel("Assets\\Doodads\\THorner05SElectricalArcs\\THorner05SElectricalArcs.m3", false);
PreloadModel("Assets\\Doodads\\TempleStoneInlay\\TempleStoneInlay.m3", false);
PreloadImage("Assets\\Textures\\shakurasex1_cliff1.dds", false);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pshakuras02.sc2map — MapScript.galaxy:994
PreloadModel("Assets\\Effects\\Protoss\\ProtossSmallUnitDeath\\ProtossSmallUnitDeath.m3", false);
PreloadModel("Assets\\Doodads\\THorner05SElectricalArcs\\THorner05SElectricalArcs.m3", false);
PreloadModel("Assets\\Doodads\\TempleStoneInlay\\TempleStoneInlay.m3", false);
PreloadImage("Assets\\Textures\\shakurasex1_cliff1.dds", false);
PreloadImage("Assets\\Textures\\shakurasex1_cliff1_specular.dds", false);
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:3433
// Automatic Variable Declarations
// Implementation
PreloadModel(lp_file, lp_queue);
}
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:2929
// Automatic Variable Declarations
// Implementation
PreloadModel(lp_file, lp_queue);
}
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:41
auto57087156_val = lp_shrineBehavior;
if (auto57087156_val == "ArcaneShrine") {
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Arcane\\Storm_Merc_HvH2_Punisher_Arcane.m3", false);
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Arcane_Death\\Storm_Merc_HvH2_Punisher_Arcane_Death.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Arcane_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Arcane_LeapImpact.m3", false);
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:42
if (auto57087156_val == "ArcaneShrine") {
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Arcane\\Storm_Merc_HvH2_Punisher_Arcane.m3", false);
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Arcane_Death\\Storm_Merc_HvH2_Punisher_Arcane_Death.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Arcane_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Arcane_LeapImpact.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Arcane_Beam_Cast\\Storm_FX_Merc_HvH2_Punisher_Arcane_Beam_Cast.m3", false);
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:43
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Arcane\\Storm_Merc_HvH2_Punisher_Arcane.m3", false);
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Arcane_Death\\Storm_Merc_HvH2_Punisher_Arcane_Death.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Arcane_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Arcane_LeapImpact.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Arcane_Beam_Cast\\Storm_FX_Merc_HvH2_Punisher_Arcane_Beam_Cast.m3", false);
}
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:44
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Arcane_Death\\Storm_Merc_HvH2_Punisher_Arcane_Death.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Arcane_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Arcane_LeapImpact.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Arcane_Beam_Cast\\Storm_FX_Merc_HvH2_Punisher_Arcane_Beam_Cast.m3", false);
}
else if (auto57087156_val == "FrozenShrine") {
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:47
}
else if (auto57087156_val == "FrozenShrine") {
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Frozen\\Storm_Merc_HvH2_Punisher_Frozen.m3", false);
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Frozen_Death\\Storm_Merc_HvH2_Punisher_Frozen_Death.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact.m3", false);
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:48
else if (auto57087156_val == "FrozenShrine") {
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Frozen\\Storm_Merc_HvH2_Punisher_Frozen.m3", false);
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Frozen_Death\\Storm_Merc_HvH2_Punisher_Frozen_Death.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion_Cast\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion_Cast.m3", false);
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:49
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Frozen\\Storm_Merc_HvH2_Punisher_Frozen.m3", false);
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Frozen_Death\\Storm_Merc_HvH2_Punisher_Frozen_Death.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion_Cast\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion_Cast.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion.m3", false);
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:50
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Frozen_Death\\Storm_Merc_HvH2_Punisher_Frozen_Death.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion_Cast\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion_Cast.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion.m3", false);
}
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:51
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Frozen_LeapImpact.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion_Cast\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion_Cast.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion\\Storm_FX_Merc_HvH2_Punisher_Frozen_FrostExplosion.m3", false);
}
else if (auto57087156_val == "BombardShrine") {
mods/heroesmapmods/battlegroundmapmods/infernalshrinesdata.stormmod — base.stormdata/LibMSHD.galaxy:54
}
else if (auto57087156_val == "BombardShrine") {
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Mortar\\Storm_Merc_HvH2_Punisher_Mortar.m3", false);
PreloadModel("Assets\\Units\\Mercs\\Storm_Merc_HvH2_Punisher_Mortar_Death\\Storm_Merc_HvH2_Punisher_Mortar_Death.m3", false);
PreloadModel("Assets\\Effects\\Storm_FX_Merc_HvH2_Punisher_Mortar_LeapImpact\\Storm_FX_Merc_HvH2_Punisher_Mortar_LeapImpact.m3", false);