# Preload Model Object
Grammar — Preload id|Model Object queue|Immediately/For Next Map
Flags —Action
Preloads a model data entry and its associated assets. The model 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
<gamelink::Model> — Modelbool
<preset::PreloadQueue> — Queue
Returns — void
void libNtve_gf_PreloadModelObject(
string lp_id,
bool lp_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/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:12325
}
if (((lp_sceneID == libCamp_ge_SceneID_SceneTerran11CharBatltefield) || (lp_sceneID == libCamp_ge_SceneID_SceneTerran16CharIntro) || (lp_sceneID == libCamp_ge_SceneID_SceneTerran17CharBattlefieldEnd))) {
libNtve_gf_PreloadModelObject("SMCharCinematicSkyparallax", false);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:32389
gf_PreloadRoomIfCondition(ge_RoomID_RoomLab, true);
libNtve_gf_PreloadModelObject("SMZeratulBriefingBorder", false);
gf_PreloadUnitStoryMap(gf_ActorUnit(ge_ActorID_ActorRaynor));
PreloadMovie("Assets\\Textures\\video_briefingportrait_zeratul_1a.ogv", false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:32520
gf_PreloadRoomIfCondition(ge_RoomID_RoomLab, true);
libNtve_gf_PreloadModelObject("SMZeratulBriefingBorder", false);
gf_PreloadUnitStoryMap(gf_ActorUnit(ge_ActorID_ActorRaynor));
PreloadMovie("Assets\\Textures\\video_briefingportrait_zeratul_2.ogv", false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:36951
gf_PreloadRoomIfCondition(ge_RoomID_RoomLab, true);
libNtve_gf_PreloadModelObject("SMZeratulBriefingBorder", false);
PreloadMovie("Assets\\Textures\\debriefing_video_tzeratul04_00.ogv", false);
ConversationDataPreloadLines("Debriefs");
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian03.sc2map/MapScript.galaxy:931
libNtve_gf_RemoveDoodadsinRegion(RegionEntireMap(), "DestroyedNydusWorm");
}
libNtve_gf_PreloadModelObject("ArtifactFullyCharged", false);
libNtve_gf_PreloadModelObject("ArtifactActivated", false);
libNtve_gf_PreloadModelObject("PowerOverwhelming", false);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian03.sc2map/MapScript.galaxy:932
}
libNtve_gf_PreloadModelObject("ArtifactFullyCharged", false);
libNtve_gf_PreloadModelObject("ArtifactActivated", false);
libNtve_gf_PreloadModelObject("PowerOverwhelming", false);
CreepModify(PointFromId(215), 10.0, true, true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian03.sc2map/MapScript.galaxy:933
libNtve_gf_PreloadModelObject("ArtifactFullyCharged", false);
libNtve_gf_PreloadModelObject("ArtifactActivated", false);
libNtve_gf_PreloadModelObject("PowerOverwhelming", false);
CreepModify(PointFromId(215), 10.0, true, true);
CreepModify(PointFromId(216), 10.0, true, true);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul02.sc2map/MapScript.galaxy:700
libLbty_gf_AutoRevealRegion(RegionFromId(44), RegionFromId(45), gv_p1_USER);
libLbty_gf_AutoRevealRegion(RegionFromId(30), RegionFromId(91), gv_p1_USER);
libNtve_gf_PreloadModelObject("VC_Zeratul2_Planet", false);
return true;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tzeratul04.sc2map/MapScript.galaxy:6592
CinematicFade(false, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
UISetMode(PlayerGroupAll(), c_uiModeFullscreen, 1.0);
libNtve_gf_PreloadModelObject("VC_Zeratul4_Fade", false);
Wait(1.0, c_timeReal);
libNtve_gf_CinematicMode(true, PlayerGroupAll(), 0.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:12325
}
if (((lp_sceneID == libCamp_ge_SceneID_SceneTerran11CharBatltefield) || (lp_sceneID == libCamp_ge_SceneID_SceneTerran16CharIntro) || (lp_sceneID == libCamp_ge_SceneID_SceneTerran17CharBattlefieldEnd))) {
libNtve_gf_PreloadModelObject("SMCharCinematicSkyparallax", false);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:32389
gf_PreloadRoomIfCondition(ge_RoomID_RoomLab, true);
libNtve_gf_PreloadModelObject("SMZeratulBriefingBorder", false);
gf_PreloadUnitStoryMap(gf_ActorUnit(ge_ActorID_ActorRaynor));
PreloadMovie("Assets\\Textures\\video_briefingportrait_zeratul_1a.ogv", false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:32520
gf_PreloadRoomIfCondition(ge_RoomID_RoomLab, true);
libNtve_gf_PreloadModelObject("SMZeratulBriefingBorder", false);
gf_PreloadUnitStoryMap(gf_ActorUnit(ge_ActorID_ActorRaynor));
PreloadMovie("Assets\\Textures\\video_briefingportrait_zeratul_2.ogv", false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:36951
gf_PreloadRoomIfCondition(ge_RoomID_RoomLab, true);
libNtve_gf_PreloadModelObject("SMZeratulBriefingBorder", false);
PreloadMovie("Assets\\Textures\\debriefing_video_tzeratul04_00.ogv", false);
ConversationDataPreloadLines("Debriefs");
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian03.sc2map — MapScript.galaxy:931
libNtve_gf_RemoveDoodadsinRegion(RegionEntireMap(), "DestroyedNydusWorm");
}
libNtve_gf_PreloadModelObject("ArtifactFullyCharged", false);
libNtve_gf_PreloadModelObject("ArtifactActivated", false);
libNtve_gf_PreloadModelObject("PowerOverwhelming", false);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian03.sc2map — MapScript.galaxy:932
}
libNtve_gf_PreloadModelObject("ArtifactFullyCharged", false);
libNtve_gf_PreloadModelObject("ArtifactActivated", false);
libNtve_gf_PreloadModelObject("PowerOverwhelming", false);
CreepModify(PointFromId(215), 10.0, true, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian03.sc2map — MapScript.galaxy:933
libNtve_gf_PreloadModelObject("ArtifactFullyCharged", false);
libNtve_gf_PreloadModelObject("ArtifactActivated", false);
libNtve_gf_PreloadModelObject("PowerOverwhelming", false);
CreepModify(PointFromId(215), 10.0, true, true);
CreepModify(PointFromId(216), 10.0, true, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul02.sc2map — MapScript.galaxy:700
libLbty_gf_AutoRevealRegion(RegionFromId(44), RegionFromId(45), gv_p1_USER);
libLbty_gf_AutoRevealRegion(RegionFromId(30), RegionFromId(91), gv_p1_USER);
libNtve_gf_PreloadModelObject("VC_Zeratul2_Planet", false);
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul04.sc2map — MapScript.galaxy:6592
CinematicFade(false, 1.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
UISetMode(PlayerGroupAll(), c_uiModeFullscreen, 1.0);
libNtve_gf_PreloadModelObject("VC_Zeratul4_Fade", false);
Wait(1.0, c_timeReal);
libNtve_gf_CinematicMode(true, PlayerGroupAll(), 0.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/evolution/zevolutionmutalisk.sc2map/MapScript.galaxy:572
TriggerExecute(gt_Init06Difficulties, true, true);
TriggerExecute(gt_Init07Help, true, true);
libNtve_gf_PreloadModelObject("EvolutionPlanet", false);
gv_broodLordActive = true;
gv_viperActive = false;
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionmutalisk.sc2map — MapScript.galaxy:572
TriggerExecute(gt_Init06Difficulties, true, true);
TriggerExecute(gt_Init07Help, true, true);
libNtve_gf_PreloadModelObject("EvolutionPlanet", false);
gv_broodLordActive = true;
gv_viperActive = false;
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2069
if ((libVoiC_gf_PC_CampaignMapContactPortrait(lp_mission) != null)) {
libNtve_gf_PreloadModelObject(libVoiC_gf_PC_CampaignMapContactPortrait(lp_mission), false);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2073
if ((libVoiC_gf_PC_CampaignMapContactActor(lp_mission) != null)) {
libNtve_gf_PreloadModelObject(libVoiC_gf_PC_CampaignMapContactPortrait(lp_mission), false);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2092
autoA2F1B4E5_val = lp_mission;
if (autoA2F1B4E5_val == "PKorhal01") {
libNtve_gf_PreloadModelObject("SMX2_StarMap_UI_Mission_Planets00", false);
libNtve_gf_PreloadModelObject("SMX2_PlanetView_Nebula_Korhal01", false);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2093
if (autoA2F1B4E5_val == "PKorhal01") {
libNtve_gf_PreloadModelObject("SMX2_StarMap_UI_Mission_Planets00", false);
libNtve_gf_PreloadModelObject("SMX2_PlanetView_Nebula_Korhal01", false);
}
else if (autoA2F1B4E5_val == "PKorhal02") {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2096
}
else if (autoA2F1B4E5_val == "PKorhal02") {
libNtve_gf_PreloadModelObject("SMX2_StarMap_UI_Mission_Planets00", false);
libNtve_gf_PreloadModelObject("SMX2_PlanetView_Nebula_Korhal01", false);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2097
else if (autoA2F1B4E5_val == "PKorhal02") {
libNtve_gf_PreloadModelObject("SMX2_StarMap_UI_Mission_Planets00", false);
libNtve_gf_PreloadModelObject("SMX2_PlanetView_Nebula_Korhal01", false);
}
else if (autoA2F1B4E5_val == "PShakuras01") {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2100
}
else if (autoA2F1B4E5_val == "PShakuras01") {
libNtve_gf_PreloadModelObject("SMX2_StarMap_UI_Mission_Planets01", false);
libNtve_gf_PreloadModelObject("SMX2_Background_Shakuras_Nebula_Cloud", false);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2101
else if (autoA2F1B4E5_val == "PShakuras01") {
libNtve_gf_PreloadModelObject("SMX2_StarMap_UI_Mission_Planets01", false);
libNtve_gf_PreloadModelObject("SMX2_Background_Shakuras_Nebula_Cloud", false);
}
else if (autoA2F1B4E5_val == "PShakuras02") {
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2104
}
else if (autoA2F1B4E5_val == "PShakuras02") {
libNtve_gf_PreloadModelObject("SMX2_StarMap_UI_Mission_Planets01", false);
libNtve_gf_PreloadModelObject("SMX2_Background_Shakuras_Nebula_Cloud", false);
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:2105
else if (autoA2F1B4E5_val == "PShakuras02") {
libNtve_gf_PreloadModelObject("SMX2_StarMap_UI_Mission_Planets01", false);
libNtve_gf_PreloadModelObject("SMX2_Background_Shakuras_Nebula_Cloud", false);
}
else if (autoA2F1B4E5_val == "PPurifier01") {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:10542
if ((libGame_gv_talents_TalentChoices[lp_player][lp_talentTier].lv_talentData[lv_itButtonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_changeType == c_talentModificationCatalogReplacement) && (libGame_gv_talents_TalentChoices[lp_player][lp_talentTier].lv_talentData[lv_itButtonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_catalog == c_gameCatalogModel)) {
lv_modelEntry = libGame_gv_talents_TalentChoices[lp_player][lp_talentTier].lv_talentData[lv_itButtonIndex].lv_abilityModificationData[lv_itAbilityMod].lv_catalogChangeTo;
libNtve_gf_PreloadModelObject((lv_modelEntry), false);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCUI.galaxy:1333
// Implementation
if ((libComC_gf_CC_MapContactPortrait(lp_mission) != null)) {
libNtve_gf_PreloadModelObject(libComC_gf_CC_MapContactPortrait(lp_mission), false);
}