# Load Animation for Unit Type
Grammar — Load animation animation for unit type unitType
Flags —Native
|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 Typestring
<filepath> — Animation
Returns — void
native void UnitTypeAnimationLoad(
string inUnitType,
string animPath,
);
# Related
Category: Animation / Advanced
- Last Animation Query —
generichandle
<animlengthquery> — AnimLengthQueryLastCreated - Query Animation Length By Identifier —
void
— AnimLengthQueryByName - Query Animation Length By Props —
void
— AnimLengthQueryByProps - Wait for Animation Length Queries —
void
— AnimLengthQueryWait - Wait for Animation —
void
— AnimWait - Animation Length —
fixed
— AnimLengthSync - Animation Time Remaining —
fixed
— AnimLengthRemainingSync - Set Animation Time —
void
— libNtve_gf_SetAnimationTime - Set Animation Time Scale —
void
— libNtve_gf_SetAnimationTimeScale - Set Animation Completion —
void
— libNtve_gf_SetAnimationCompletion - Set Animation Duration —
void
— libNtve_gf_SetAnimationDuration - Load Model Animation —
void
— ModelAnimationLoad - Load Overriding Model Animation —
void
— ModelAnimationLoadOverriding - Unload Model Animation —
void
— ModelAnimationUnload - Load Animation for Unit Type —
void
— UnitTypeAnimationLoad - Load Overriding Animation for Unit Type —
void
— UnitTypeAnimationLoadOverriding - Unload Animation for Unit Type —
void
— UnitTypeAnimationUnload
# Examples
campaigns/liberty.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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);