# Sound Portrait Model
Grammar — Sound portrait model for soundLink
Flags —Native
|Function
Returns the portrait model, if any, defined for the sound in data.
# Arguments
soundlink
— Sound Link
Returns — string
<gamelink::Model>
native string SoundPortraitModel(soundlink link);
# Related
Category: Sound / Sound Properties
- Sound Asset Index —
int
— SoundLinkAsset - Sound ID —
string
<gamelink::Sound> — SoundLinkId - Sound Link —
soundlink
— SoundLink - Sound Subtitle Text —
text
— SoundSubtitleText - Sound Portrait Model —
string
<gamelink::Model> — SoundPortraitModel - Sound Duration —
fixed
— SoundLengthSync - Mark Sound For Duration Preload — macro
- Query Sound Duration —
void
— SoundLengthQuery - Wait For Sound Durations —
void
— SoundLengthQueryWait
# Examples
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:862
lv_oldTrigger = libSwaC_gv_zS_SendTransmissionCampaignTrigger;
libSwaC_gv_zS_SendTransmissionCampaignTrigger = TriggerGetCurrent();
if ((lp_keepPortraitVisible != libSwaC_ge_CampaignTransmissionPortraitOptioins_DontShowPortrait) && ((lp_model != null) || ((lp_model == null) && (SoundPortraitModel(lp_sound) != null)) || ((lp_isPlaceHolder == true) && (lp_unit != null)))) {
if ((libNtve_gf_PlayerInCinematicMode(1) == false) && (libNtve_gf_PlayerInStoryMode(1) == false)) {
lv_portrait = libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2795
lv_oldTrigger = libVCMI_gv_pM_SendTransmissionCampaignTrigger;
libVCMI_gv_pM_SendTransmissionCampaignTrigger = TriggerGetCurrent();
if ((lp_keepPortraitVisible != libVCMI_ge_MissionTransmissionPortraitOptioins_DontShowPortrait) && ((lp_model != null) || ((lp_model == null) && (SoundPortraitModel(lp_sound) != null)) || ((lp_isPlaceHolder == true) && (lp_unit != null)))) {
if ((libNtve_gf_PlayerInCinematicMode(1) == false) && (libNtve_gf_PlayerInStoryMode(1) == false)) {
lv_portrait = libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/HeroesLib.galaxy:3571
lv_oldTrigger = libCore_gv_zS_SendTransmissionCampaignTrigger;
libCore_gv_zS_SendTransmissionCampaignTrigger = TriggerGetCurrent();
if ((lp_keepPortraitVisible != libCore_ge_TransmissionPortraitOptioins_DontShowPortrait) && ((lp_model != null) || ((lp_model == null) && (SoundPortraitModel(lp_sound) != null)) || ((lp_isPlaceHolder == true) && (lp_unit != null)))) {
if ((libNtve_gf_PlayerInCinematicMode(1) == false) && (libNtve_gf_PlayerInStoryMode(1) == false)) {
lv_portrait = PortraitGetGame();
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/HeroesLib.galaxy:3771
lv_oldTrigger = libCore_gv_zS_SendTransmissionCampaignTrigger;
libCore_gv_zS_SendTransmissionCampaignTrigger = TriggerGetCurrent();
if ((lp_keepPortraitVisible != libCore_ge_TransmissionPortraitOptioins_DontShowPortrait) && ((lp_model != null) || ((lp_model == null) && (SoundPortraitModel(lp_sound) != null)) || ((lp_isPlaceHolder == true) && (lp_unit != null)))) {
if ((libNtve_gf_PlayerInCinematicMode(1) == false) && (libNtve_gf_PlayerInStoryMode(1) == false)) {
lv_portrait = PortraitGetGame();
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:3009
lv_oldTrigger = libNCMI_gv_NM_SendTransmissionCampaignTrigger;
libNCMI_gv_NM_SendTransmissionCampaignTrigger = TriggerGetCurrent();
if ((lp_keepPortraitVisible != libNCMI_ge_MissionTransmissionPortraitOptioins_DontShowPortrait) && ((lp_model != null) || ((lp_model == null) && (SoundPortraitModel(lp_sound) != null)) || ((lp_isPlaceHolder == true) && (lp_unit != null)))) {
if ((libNtve_gf_PlayerInCinematicMode(1) == false) && (libNtve_gf_PlayerInStoryMode(1) == false)) {
lv_portrait = libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft);
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCUI.galaxy:887
libNtve_gf_SetDialogItemText(libNCUI_gv_nU_MissionPortraitTitle, lv_characterName, PlayerGroupAll());
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromModel(SoundPortraitModel(SoundLink(lp_transmission, c_soundIndexAny))), PortraitGetTriggerControl(libNCUI_gv_nU_MissionPortrait), SoundLink(lp_transmission, c_soundIndexAny), 0.0, c_transmissionDurationAdd, false);
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCUI.galaxy:5792
libNCUI_gv_nU_MissionUpgradesButtonAlwaysOff = true;
libNCUI_gf_NU_MissionEnableDisableUpgradesButton(false);
libNtve_gf_SendTransmissionSimple(TransmissionSourceFromModel(SoundPortraitModel(SoundLink(ConversationDataGetSound("Tutorial_ArmyUpgradeRoom3|Line00003", true), c_soundIndexAny))), PortraitGetTriggerControl(libNCUI_gv_nU_MissionPortrait), SoundLink(ConversationDataGetSound("Tutorial_ArmyUpgradeRoom3|Line00003", true), c_soundIndexAny), 0.0, c_transmissionDurationAdd, true);
}
else {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:10724
lv_oldTrigger = libCOMI_gv_cM_SendTransmissionCampaignTrigger;
libCOMI_gv_cM_SendTransmissionCampaignTrigger = TriggerGetCurrent();
if ((lp_keepPortraitVisible != libCOMI_ge_MissionTransmissionPortraitOptioins_DontShowPortrait) && ((lp_model != null) || ((lp_model == null) && (SoundPortraitModel(lp_sound) != null)) || ((lp_isPlaceHolder == true) && (lp_unit != null)))) {
if ((libNtve_gf_PlayerInCinematicMode(1) == false) && (libNtve_gf_PlayerInStoryMode(1) == false)) {
lv_portrait = libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:553
lv_oldTrigger = libA3DDD02B_gv_pP_SendTransmissionCampaignTrigger;
libA3DDD02B_gv_pP_SendTransmissionCampaignTrigger = TriggerGetCurrent();
if ((lp_keepPortraitVisible != libA3DDD02B_ge_CampaignTransmissionPortraitOptioins_DontShowPortrait) && ((lp_model != null) || ((lp_model == null) && (SoundPortraitModel(lp_sound) != null)) || ((lp_isPlaceHolder == true) && (lp_unit != null)))) {
if ((libNtve_gf_PlayerInCinematicMode(1) == false) && (libNtve_gf_PlayerInStoryMode(1) == false)) {
lv_portrait = libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft);