# Use Model Camera
Grammar — Use model camera name|Camera Name from u for player player, applying over duration seconds
Flags —Native
|Action
Uses the camera setting that is specific to a unit. This is primarily for model assets which have a built in camera, such as Portraits.
# Arguments
int
— Playerunit
— Unitstring
<modelcamera> — Namefixed
— Duration
Returns — void
native void CameraUseModel(
int player,
unit u,
string name,
fixed duration,
);
# Related
Category: Camera / Model Cameras
- Use Model Camera —
void
— CameraUseModel - Set Camera Channel —
void
— CameraSetChannel - Clear Camera Channel —
void
— CameraClearChannel
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:8625
auto67E08BC8_val = lp_room;
{
CameraUseModel(lv_player, gf_RoomUnit(lp_room), "Default", lp_duration);
gf_ClearAnimationwithblendtime(gv_aNIMID_ZOOM, gf_RoomUnit(ge_RoomID_RoomArmory), 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_RoomUnit(ge_RoomID_RoomArmory)), gv_aNIMID_ZOOM, "Stand", c_animFlagPlayForever, 0.0);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:9463
for ( ; autoB9BF28AF_p <= PlayerGroupCount(autoB9BF28AF_g) ; autoB9BF28AF_p += BoolToInt(lv_indexPlayer == PlayerGroupPlayer(autoB9BF28AF_g, autoB9BF28AF_p)) ) {
lv_indexPlayer = PlayerGroupPlayer(autoB9BF28AF_g, autoB9BF28AF_p);
CameraUseModel(lv_indexPlayer, lp_room, lp_zoomCamera, 0.0);
}
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lp_room), gv_aNIMID_ZOOM, lp_animation, c_animFlagPlayForever | c_animFlagNonLooping, 0);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:9503
for ( ; autoFB9AF868_p <= PlayerGroupCount(autoFB9AF868_g) ; autoFB9AF868_p += BoolToInt(lv_indexPlayer == PlayerGroupPlayer(autoFB9AF868_g, autoFB9AF868_p)) ) {
lv_indexPlayer = PlayerGroupPlayer(autoFB9AF868_g, autoFB9AF868_p);
CameraUseModel(lv_indexPlayer, gf_RoomUnit(lp_room), lp_zoomBackCamera, 0.0);
}
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_RoomUnit(lp_room)), gv_aNIMID_ZOOM, lp_zoomBackAnimation, c_animFlagNonLooping, 0);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:9996
}
CameraUseModel(1, gf_RoomUnit(ge_RoomID_RoomArmory), lp_camera, 0.0);
lv_gradientWidthPercent = ConversationDataStateFixedValue(lp_convoID, "Gradient Percent");
lv_gradientWidth = FixedToInt((1600.0 * lv_gradientWidthPercent));
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:11227
}
gf_DisplayDebugMessage((StringExternal("Param/Value/61281884") + gf_RoomName(lp_room) + StringExternal("Param/Value/B463AF26") + gf_ActorName(lp_character) + StringExternal("Param/Value/20728E6C") + StringToText(lv_cameraName)));
CameraUseModel(1, lp_cameraObject, lv_cameraName, 0.0);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:13332
lv_cameraName = gf_BriefingCamera(lp_camera);
CameraUseModel(1, gf_BriefingScreen(lp_room, ge_BriefingScreen_Main), lv_cameraName, (lp_duration * 1.0));
if ((lp_camera == ge_BriefingCamera_Intro2)) {
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_BriefingScreen(lp_room, ge_BriefingScreen_Main)), c_animNameDefault, "Birth", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:18118
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gv_marSaraTychusCameras), c_animNameDefault, "Stand", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);
CameraUseModel(1, gv_marSaraTychusCameras, "Pan to Character Medium", 0.0);
return true;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:34859
gf_UseConversationCamera(ge_RoomID_RoomBridge, ge_ActorID_ActorHorner, ge_ConvoCameraType_ConvoCameraChar1Medium, gv_bridgeHornerCameras);
UnitIssueOrder(gv_debriefingTRaynor03WalkingOfficer, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(529)), c_orderQueueReplace);
CameraUseModel(1, UnitFromId(1068), "SM_HyperionBridgeTRaynor03BriefingCamera", 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(UnitFromId(1068)), gv_aNIMID_ZOOM, "Spell", c_animFlagPlayForever | c_animFlagNonLooping, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(UnitFromId(1028)), c_animNameDefault, "Fidget 05", c_animFlagFullMatch | c_animFlagNonLooping, c_animTimeDefault);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:8625
auto67E08BC8_val = lp_room;
{
CameraUseModel(lv_player, gf_RoomUnit(lp_room), "Default", lp_duration);
gf_ClearAnimationwithblendtime(gv_aNIMID_ZOOM, gf_RoomUnit(ge_RoomID_RoomArmory), 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_RoomUnit(ge_RoomID_RoomArmory)), gv_aNIMID_ZOOM, "Stand", c_animFlagPlayForever, 0.0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:9463
for ( ; autoB9BF28AF_p <= PlayerGroupCount(autoB9BF28AF_g) ; autoB9BF28AF_p += BoolToInt(lv_indexPlayer == PlayerGroupPlayer(autoB9BF28AF_g, autoB9BF28AF_p)) ) {
lv_indexPlayer = PlayerGroupPlayer(autoB9BF28AF_g, autoB9BF28AF_p);
CameraUseModel(lv_indexPlayer, lp_room, lp_zoomCamera, 0.0);
}
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(lp_room), gv_aNIMID_ZOOM, lp_animation, c_animFlagPlayForever | c_animFlagNonLooping, 0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:9503
for ( ; autoFB9AF868_p <= PlayerGroupCount(autoFB9AF868_g) ; autoFB9AF868_p += BoolToInt(lv_indexPlayer == PlayerGroupPlayer(autoFB9AF868_g, autoFB9AF868_p)) ) {
lv_indexPlayer = PlayerGroupPlayer(autoFB9AF868_g, autoFB9AF868_p);
CameraUseModel(lv_indexPlayer, gf_RoomUnit(lp_room), lp_zoomBackCamera, 0.0);
}
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_RoomUnit(lp_room)), gv_aNIMID_ZOOM, lp_zoomBackAnimation, c_animFlagNonLooping, 0);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:9996
}
CameraUseModel(1, gf_RoomUnit(ge_RoomID_RoomArmory), lp_camera, 0.0);
lv_gradientWidthPercent = ConversationDataStateFixedValue(lp_convoID, "Gradient Percent");
lv_gradientWidth = FixedToInt((1600.0 * lv_gradientWidthPercent));
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:11227
}
gf_DisplayDebugMessage((StringExternal("Param/Value/61281884") + gf_RoomName(lp_room) + StringExternal("Param/Value/B463AF26") + gf_ActorName(lp_character) + StringExternal("Param/Value/20728E6C") + StringToText(lv_cameraName)));
CameraUseModel(1, lp_cameraObject, lv_cameraName, 0.0);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:13332
lv_cameraName = gf_BriefingCamera(lp_camera);
CameraUseModel(1, gf_BriefingScreen(lp_room, ge_BriefingScreen_Main), lv_cameraName, (lp_duration * 1.0));
if ((lp_camera == ge_BriefingCamera_Intro2)) {
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gf_BriefingScreen(lp_room, ge_BriefingScreen_Main)), c_animNameDefault, "Birth", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:18118
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(gv_marSaraTychusCameras), c_animNameDefault, "Stand", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);
CameraUseModel(1, gv_marSaraTychusCameras, "Pan to Character Medium", 0.0);
return true;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:34859
gf_UseConversationCamera(ge_RoomID_RoomBridge, ge_ActorID_ActorHorner, ge_ConvoCameraType_ConvoCameraChar1Medium, gv_bridgeHornerCameras);
UnitIssueOrder(gv_debriefingTRaynor03WalkingOfficer, OrderTargetingPoint(AbilityCommand("move", 0), PointFromId(529)), c_orderQueueReplace);
CameraUseModel(1, UnitFromId(1068), "SM_HyperionBridgeTRaynor03BriefingCamera", 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(UnitFromId(1068)), gv_aNIMID_ZOOM, "Spell", c_animFlagPlayForever | c_animFlagNonLooping, 0.0);
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(UnitFromId(1028)), c_animNameDefault, "Fidget 05", c_animFlagFullMatch | c_animFlagNonLooping, c_animTimeDefault);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zstorychar.sc2map/MapScript.galaxy:466
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
if ((lib281DEC45_gf_KerriganUsesAltPosition() == true)) {
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Main", 0.0);
}
else {
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zstorychar.sc2map/MapScript.galaxy:469
}
else {
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
}
if ((gv_birthScenePlayed == false) && (libSwaC_gf_StoryMapTypeCheck(libSwaC_gf_LastMap(), c_mapKindStory) == true)) {
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2map/MapScript.galaxy:454
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
if ((gf_UseMainCamera() == false)) {
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
}
else {
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2map/MapScript.galaxy:457
}
else {
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Main", 0.0);
}
if ((lib281DEC45_gf_CharacterIsEnabled("Zagara") == true)) {
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zstoryhybrid.sc2map/MapScript.galaxy:400
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Stukov"), "B", true, 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Zagara"), "B", true, 0.0);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
gf_InitAmbientScenes();
return true;
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zstorykorhal.sc2map/MapScript.galaxy:451
TriggerExecute(gt_ApplyKorhalLighting, true, false);
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Stukov"), "B", true, 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Zagara"), "B", true, 0.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zstorykorhal.sc2map/MapScript.galaxy:480
TriggerExecute(gt_ApplyKorhalLighting, true, false);
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Stukov"), "B", true, 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Zagara"), "B", true, 0.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zstoryspace.sc2map/MapScript.galaxy:374
TriggerExecute(gt_ApplyKaldirLighting, true, false);
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
if ((lib281DEC45_gf_CharacterIsEnabled("Stukov") == true)) {
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Stukov"), "B", true, 0.0);
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zstoryzerus.sc2map/MapScript.galaxy:416
TriggerExecute(gt_ApplyZerusLighting, true, false);
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
if ((lib281DEC45_gf_CharacterIsEnabled("Zagara") == true)) {
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Zagara"), "B", true, 0.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstorychar.sc2map — MapScript.galaxy:466
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
if ((lib281DEC45_gf_KerriganUsesAltPosition() == true)) {
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Main", 0.0);
}
else {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstorychar.sc2map — MapScript.galaxy:469
}
else {
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
}
if ((gv_birthScenePlayed == false) && (libSwaC_gf_StoryMapTypeCheck(libSwaC_gf_LastMap(), c_mapKindStory) == true)) {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2map — MapScript.galaxy:454
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
if ((gf_UseMainCamera() == false)) {
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
}
else {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2map — MapScript.galaxy:457
}
else {
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Main", 0.0);
}
if ((lib281DEC45_gf_CharacterIsEnabled("Zagara") == true)) {
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryhybrid.sc2map — MapScript.galaxy:400
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Stukov"), "B", true, 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Zagara"), "B", true, 0.0);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
gf_InitAmbientScenes();
return true;
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstorykorhal.sc2map — MapScript.galaxy:451
TriggerExecute(gt_ApplyKorhalLighting, true, false);
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Stukov"), "B", true, 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Zagara"), "B", true, 0.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstorykorhal.sc2map — MapScript.galaxy:480
TriggerExecute(gt_ApplyKorhalLighting, true, false);
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Stukov"), "B", true, 0.0);
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Zagara"), "B", true, 0.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryspace.sc2map — MapScript.galaxy:374
TriggerExecute(gt_ApplyKaldirLighting, true, false);
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
if ((lib281DEC45_gf_CharacterIsEnabled("Stukov") == true)) {
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Stukov"), "B", true, 0.0);
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryzerus.sc2map — MapScript.galaxy:416
TriggerExecute(gt_ApplyZerusLighting, true, false);
lib281DEC45_gf_ShowHideUnitAbs(true, gv_uNITSETLeviathanPool);
CameraUseModel(1, gv_uNITSETLeviathan00, "Camera_Far", 0.0);
if ((lib281DEC45_gf_CharacterIsEnabled("Zagara") == true)) {
lib281DEC45_gf_TurnAnimationPropertiesOnOff(lib281DEC45_gf_CharacterUnit("Zagara"), "B", true, 0.0);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:7447
libSwaC_gf_ZS_ArmyCustomEggEvoPlayLight(true);
libSwaC_gf_ZS_ArmyCustomEggSetPlayLight(true);
CameraUseModel(1, libSwaC_gv_zS_ArmyCustomEggRoom, libSwaC_gf_ZS_EggRoomCamera(), 0.0);
if ((libSwaC_gv_zS_ArmyCustomEggRoomOpened == false)) {
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(libSwaC_gv_zS_ArmyCustomEggRoom), "ZOOM", "Birth", c_animFlagFullMatch | c_animFlagPlayForever | c_animFlagNonLooping, 0.0);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:8554
}
CameraUseModel(1, libSwaC_gv_zS_ArmyCustomEggRoom, libSwaC_gf_ZS_ArmyCustomCategoryEggCamera(libSwaC_gv_zS_ArmyCustomCategoryCurrent), 0.0);
if ((UserDataGetInt("StoryStates", "Unit Upgrade UI Visited", "value", 1) == 0)) {
UserDataSetInt("StoryStates", "Unit Upgrade UI Visited", "value", 1, 1);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:8922
VisRevealArea(1, RegionCircle(UnitGetPosition(libSwaC_gv_zS_ArmyCustomEvolutionSet), 32.0), 0.0, false);
lv_camera = libSwaC_gf_ZS_ArmyCustomEvolutionUICamera(libSwaC_gv_zS_ArmyCustomEvolutionCategory);
CameraUseModel(1, libSwaC_gv_zS_ArmyCustomEvolutionSet, lv_camera, 0.0);
if ((libSwaC_gv_zS_ArmyCustomEvolutionUnitA == null)) {
lv_armyUnit = libSwaC_gf_StoryArmyUnitInCategory(libSwaC_gv_zS_ArmyCustomEvolutionCategory, 1);
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:11858
ActorSend(libNtve_gf_ActorLastCreated(), "SetScale 10.500000");
libSwaC_gv_zS_KerriganUIBackgroundKerrigan = libNtve_gf_ActorLastCreated();
CameraUseModel(1, libSwaC_gv_zS_KerriganUIBackground, "Star2Camera003", 0.0);
}
else {
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:20165
}
CameraUseModel(1, libSwaC_gv_zS_ArmyCustomEggRoom, libSwaC_gf_ZS_EggRoomCamera(), 0.0);
SoundPlay(SoundLink("UI_EvolutionChamber_unit_click", -1), PlayerGroupAll(), 100.0, 0.0);
libSwaC_gf_ZS_ArmyEggRoomTurnClickableOnOff(false);