# Load Animation for Unit Type

Grammar — Load animation animation for unit type unitType
FlagsNative | Action

Loads an animation for a unit. Note: This is a specialized action that generally relates to storymode models. It allows a model to load an additional set of animations set up for it. If a model is not set up to have additional animations, this action will not work.

# Arguments

  • string<gamelink::Unit> — Unit Type
  • string<filepath> — Animation

Returns — void

native void UnitTypeAnimationLoad(
	string inUnitType,
	string animPath,
);

Category: Animation / Advanced

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:6714


            if ((lv_animNew != null)) {
                UnitTypeAnimationLoad(UnitGetType(gf_ActorUnit(lp_actor)), lv_animNew);
                TriggerDebugOutput(1, (StringExternal("Param/Value/F7062F37") + StringToText(lv_animNew) + StringExternal("Param/Value/8A217FF5") + gf_ActorName(lp_actor)), false);
            }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:6730

    auto205CF2C7_val = lp_actorID;
    if (auto205CF2C7_val == ge_ActorID_ActorHorner) {
        UnitTypeAnimationLoad(UnitGetType(gf_ActorUnit(lp_actorID)), "Assets\\StoryModeCharacters\\Terran\\SM_FirstOfficer_RequiredAnimsComplex\\SM_FirstOfficer_RequiredAnimsComplex.m3a");
    }
    else {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:7099

    // Implementation
    if ((lp_room != ge_RoomID_RoomChar) && ((lp_room != ge_RoomID_RoomMarSara) || (lp_type == ge_SceneType_Scene))) {
        UnitTypeAnimationLoad(UnitGetType(gf_ActorUnit(ge_ActorID_ActorTychus)), "Assets\\StoryModeCharacters\\Terran\\SM_Marine01_ConversationAnims\\SM_Marine01_ConversationAnims.m3a");
        gf_TurnAnimationPropertiesOnOff(gf_ActorUnit(ge_ActorID_ActorTychus), "B", true, 0.0);
    }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19963

    gf_PrepareRoomActors(ge_RoomID_RoomChar, true);
    gf_PrepareRoomCharArtifactLogic();
    UnitTypeAnimationLoad("SMViking", "Assets\\StoryModeCharacters\\Terran\\SM_Viking_CharAnims\\SM_Viking_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMutalisk", "Assets\\StoryModeCharacters\\Zerg\\SM_Mutalisk_CharAnims\\SM_Mutalisk_CharAnims.m3a");
    UnitTypeAnimationLoad("SMBanshee", "Assets\\StoryModeCharacters\\Terran\\SM_Banshee_CharAnims\\SM_Banshee_CharAnims.m3a");

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19964

    gf_PrepareRoomCharArtifactLogic();
    UnitTypeAnimationLoad("SMViking", "Assets\\StoryModeCharacters\\Terran\\SM_Viking_CharAnims\\SM_Viking_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMutalisk", "Assets\\StoryModeCharacters\\Zerg\\SM_Mutalisk_CharAnims\\SM_Mutalisk_CharAnims.m3a");
    UnitTypeAnimationLoad("SMBanshee", "Assets\\StoryModeCharacters\\Terran\\SM_Banshee_CharAnims\\SM_Banshee_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMarine03", "Assets\\StoryModeCharacters\\Terran\\SM_Marine03_CharAnims\\SM_Marine03_CharAnims.m3a");

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19965

    UnitTypeAnimationLoad("SMViking", "Assets\\StoryModeCharacters\\Terran\\SM_Viking_CharAnims\\SM_Viking_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMutalisk", "Assets\\StoryModeCharacters\\Zerg\\SM_Mutalisk_CharAnims\\SM_Mutalisk_CharAnims.m3a");
    UnitTypeAnimationLoad("SMBanshee", "Assets\\StoryModeCharacters\\Terran\\SM_Banshee_CharAnims\\SM_Banshee_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMarine03", "Assets\\StoryModeCharacters\\Terran\\SM_Marine03_CharAnims\\SM_Marine03_CharAnims.m3a");
    gf_TurnAnimationPropertiesOnOff(gv_charBansheeA, "A", true, 0.0);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19966

    UnitTypeAnimationLoad("SMMutalisk", "Assets\\StoryModeCharacters\\Zerg\\SM_Mutalisk_CharAnims\\SM_Mutalisk_CharAnims.m3a");
    UnitTypeAnimationLoad("SMBanshee", "Assets\\StoryModeCharacters\\Terran\\SM_Banshee_CharAnims\\SM_Banshee_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMarine03", "Assets\\StoryModeCharacters\\Terran\\SM_Marine03_CharAnims\\SM_Marine03_CharAnims.m3a");
    gf_TurnAnimationPropertiesOnOff(gv_charBansheeA, "A", true, 0.0);
    gf_TurnAnimationPropertiesOnOff(gv_charBansheeB, "B", true, 0.0);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:6714


            if ((lv_animNew != null)) {
                UnitTypeAnimationLoad(UnitGetType(gf_ActorUnit(lp_actor)), lv_animNew);
                TriggerDebugOutput(1, (StringExternal("Param/Value/F7062F37") + StringToText(lv_animNew) + StringExternal("Param/Value/8A217FF5") + gf_ActorName(lp_actor)), false);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:6730

    auto205CF2C7_val = lp_actorID;
    if (auto205CF2C7_val == ge_ActorID_ActorHorner) {
        UnitTypeAnimationLoad(UnitGetType(gf_ActorUnit(lp_actorID)), "Assets\\StoryModeCharacters\\Terran\\SM_FirstOfficer_RequiredAnimsComplex\\SM_FirstOfficer_RequiredAnimsComplex.m3a");
    }
    else {

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:7099

    // Implementation
    if ((lp_room != ge_RoomID_RoomChar) && ((lp_room != ge_RoomID_RoomMarSara) || (lp_type == ge_SceneType_Scene))) {
        UnitTypeAnimationLoad(UnitGetType(gf_ActorUnit(ge_ActorID_ActorTychus)), "Assets\\StoryModeCharacters\\Terran\\SM_Marine01_ConversationAnims\\SM_Marine01_ConversationAnims.m3a");
        gf_TurnAnimationPropertiesOnOff(gf_ActorUnit(ge_ActorID_ActorTychus), "B", true, 0.0);
    }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:19963

    gf_PrepareRoomActors(ge_RoomID_RoomChar, true);
    gf_PrepareRoomCharArtifactLogic();
    UnitTypeAnimationLoad("SMViking", "Assets\\StoryModeCharacters\\Terran\\SM_Viking_CharAnims\\SM_Viking_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMutalisk", "Assets\\StoryModeCharacters\\Zerg\\SM_Mutalisk_CharAnims\\SM_Mutalisk_CharAnims.m3a");
    UnitTypeAnimationLoad("SMBanshee", "Assets\\StoryModeCharacters\\Terran\\SM_Banshee_CharAnims\\SM_Banshee_CharAnims.m3a");

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:19964

    gf_PrepareRoomCharArtifactLogic();
    UnitTypeAnimationLoad("SMViking", "Assets\\StoryModeCharacters\\Terran\\SM_Viking_CharAnims\\SM_Viking_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMutalisk", "Assets\\StoryModeCharacters\\Zerg\\SM_Mutalisk_CharAnims\\SM_Mutalisk_CharAnims.m3a");
    UnitTypeAnimationLoad("SMBanshee", "Assets\\StoryModeCharacters\\Terran\\SM_Banshee_CharAnims\\SM_Banshee_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMarine03", "Assets\\StoryModeCharacters\\Terran\\SM_Marine03_CharAnims\\SM_Marine03_CharAnims.m3a");

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:19965

    UnitTypeAnimationLoad("SMViking", "Assets\\StoryModeCharacters\\Terran\\SM_Viking_CharAnims\\SM_Viking_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMutalisk", "Assets\\StoryModeCharacters\\Zerg\\SM_Mutalisk_CharAnims\\SM_Mutalisk_CharAnims.m3a");
    UnitTypeAnimationLoad("SMBanshee", "Assets\\StoryModeCharacters\\Terran\\SM_Banshee_CharAnims\\SM_Banshee_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMarine03", "Assets\\StoryModeCharacters\\Terran\\SM_Marine03_CharAnims\\SM_Marine03_CharAnims.m3a");
    gf_TurnAnimationPropertiesOnOff(gv_charBansheeA, "A", true, 0.0);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:19966

    UnitTypeAnimationLoad("SMMutalisk", "Assets\\StoryModeCharacters\\Zerg\\SM_Mutalisk_CharAnims\\SM_Mutalisk_CharAnims.m3a");
    UnitTypeAnimationLoad("SMBanshee", "Assets\\StoryModeCharacters\\Terran\\SM_Banshee_CharAnims\\SM_Banshee_CharAnims.m3a");
    UnitTypeAnimationLoad("SMMarine03", "Assets\\StoryModeCharacters\\Terran\\SM_Marine03_CharAnims\\SM_Marine03_CharAnims.m3a");
    gf_TurnAnimationPropertiesOnOff(gv_charBansheeA, "A", true, 0.0);
    gf_TurnAnimationPropertiesOnOff(gv_charBansheeB, "B", true, 0.0);