# Portrait Is Visible
Grammar — portrait is visible for player player
Flags —Native
|Function
Returns true if the specified portrait is visible for the specified player.
# Arguments
int
<portrait> — Portraitint
— Player
Returns — bool
native bool PortraitVisible(int p, int player);
# Related
Category: Portrait / Basic
- Create Portrait —
int
<portrait> — PortraitCreate - Show/Hide Portrait —
void
— PortraitSetVisible - Last Created Portrait —
int
<portrait> — PortraitLastCreated - Portrait Is Visible —
bool
— PortraitVisible
# Examples
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:873
lv_portrait = c_invalidPortraitId;
}
if (((lp_cueSoundOption == libSwaC_ge_CampaignTransmissionCueSoundOptions_PlayCueSound) || ((lp_cueSoundOption == libSwaC_ge_CampaignTransmissionCueSoundOptions_DefaultCueSoundBehavior) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (lv_portrait != c_invalidPortraitId) && (PortraitVisible(libSwaC_gv_zS_SendTransmissionCampaignPortrait, 1) == false)))) {
libLbty_gf_PlayTransmissionCueSound(PlayerGroupAll());
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:2545
while (true) {
if ((libSwaC_gv_zS_ObjectivePanel != c_invalidDialogControlId) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (libSwaC_gv_zS_GameOver == false)) {
if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (libSwaC_gv_zS_SwarmHeroUIPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libSwaC_gv_zS_SwarmHeroUIPanel[1], 1) == true) && (libSwaC_gv_zS_SwarmHeroUIPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libSwaC_gv_zS_SwarmHeroUIPanel[2], 1) == true)) {
libNtve_gf_SetDialogItemAlphaMask(libSwaC_gv_zS_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:2548
libNtve_gf_SetDialogItemAlphaMask(libSwaC_gv_zS_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
else if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (((libSwaC_gv_zS_SwarmHeroUIPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libSwaC_gv_zS_SwarmHeroUIPanel[1], 1) == true)) || ((libSwaC_gv_zS_SwarmHeroUIPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libSwaC_gv_zS_SwarmHeroUIPanel[2], 1) == true)))) {
libNtve_gf_SetDialogItemAlphaMask(libSwaC_gv_zS_ObjectivePanel, "@UI/ObjectivePanelMask", PlayerGroupAll());
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:2551
libNtve_gf_SetDialogItemAlphaMask(libSwaC_gv_zS_ObjectivePanel, "@UI/ObjectivePanelMask", PlayerGroupAll());
}
else if (((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == false) || (((libSwaC_gv_zS_SwarmHeroUIPanel[1] == c_invalidDialogControlId) || (DialogControlIsVisible(libSwaC_gv_zS_SwarmHeroUIPanel[1], 1) == false)) && ((libSwaC_gv_zS_SwarmHeroUIPanel[2] == c_invalidDialogControlId) || (DialogControlIsVisible(libSwaC_gv_zS_SwarmHeroUIPanel[2], 1) == false))))) {
libNtve_gf_SetDialogItemAlphaMask(libSwaC_gv_zS_ObjectivePanel, "", PlayerGroupAll());
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:2585
// Implementation
if ((libSwaC_gv_zS_ErrorPanel != c_invalidDialogControlId) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (libSwaC_gv_zS_GameOver == false)) {
if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true)) {
if ((libSwaC_gv_zS_ErrorPanelMaskOn == false)) {
libSwaC_gv_zS_ErrorPanelMaskOn = true;
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2806
lv_portrait = c_invalidPortraitId;
}
if (((lp_cueSoundOption == libVCMI_ge_MissionTransmissionCueSoundOptions_PlayCueSound) || ((lp_cueSoundOption == libVCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (lv_portrait != c_invalidPortraitId) && (PortraitVisible(libVCMI_gv_pM_SendTransmissionCampaignPortrait, 1) == false)))) {
libLbty_gf_PlayTransmissionCueSound(PlayerGroupAll());
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:4152
while (true) {
if ((libVCUI_gv_pU_ObjectivePanel != c_invalidDialogControlId) && (libNtve_gf_PlayerInCinematicMode(1) == false)) {
if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (libVCUI_gv_pU_VoidHeroUIPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libVCUI_gv_pU_VoidHeroUIPanel[1], 1) == true) && (libVCUI_gv_pU_VoidHeroUIPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libVCUI_gv_pU_VoidHeroUIPanel[2], 1) == true)) {
libNtve_gf_SetDialogItemAlphaMask(libVCUI_gv_pU_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:4155
libNtve_gf_SetDialogItemAlphaMask(libVCUI_gv_pU_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
else if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (((libVCUI_gv_pU_VoidHeroUIPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libVCUI_gv_pU_VoidHeroUIPanel[1], 1) == true)) || ((libVCUI_gv_pU_VoidHeroUIPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libVCUI_gv_pU_VoidHeroUIPanel[2], 1) == true)))) {
libNtve_gf_SetDialogItemAlphaMask(libVCUI_gv_pU_ObjectivePanel, "", PlayerGroupAll());
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:4158
libNtve_gf_SetDialogItemAlphaMask(libVCUI_gv_pU_ObjectivePanel, "", PlayerGroupAll());
}
else if (((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == false) || (((libVCUI_gv_pU_VoidHeroUIPanel[1] == c_invalidDialogControlId) || (DialogControlIsVisible(libVCUI_gv_pU_VoidHeroUIPanel[1], 1) == false)) && ((libVCUI_gv_pU_VoidHeroUIPanel[2] == c_invalidDialogControlId) || (DialogControlIsVisible(libVCUI_gv_pU_VoidHeroUIPanel[2], 1) == false))))) {
libNtve_gf_SetDialogItemAlphaMask(libVCUI_gv_pU_ObjectivePanel, "", PlayerGroupAll());
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:3020
lv_portrait = c_invalidPortraitId;
}
if (((lp_cueSoundOption == libNCMI_ge_MissionTransmissionCueSoundOptions_PlayCueSound) || ((lp_cueSoundOption == libNCMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (lv_portrait != c_invalidPortraitId) && (PortraitVisible(libNCMI_gv_NM_SendTransmissionCampaignPortrait, 1) == false)))) {
libLbty_gf_PlayTransmissionCueSound(PlayerGroupAll());
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCUI.galaxy:3645
while (true) {
if ((libNCUI_gv_NU_ObjectivePanel != c_invalidDialogControlId) && (libNtve_gf_PlayerInCinematicMode(1) == false)) {
if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (libNCUI_gv_nU_HeroPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libNCUI_gv_nU_HeroPanel[1], 1) == true) && (libNCUI_gv_nU_HeroPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libNCUI_gv_nU_HeroPanel[2], 1) == true)) {
libNtve_gf_SetDialogItemAlphaMask(libNCUI_gv_NU_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCUI.galaxy:3648
libNtve_gf_SetDialogItemAlphaMask(libNCUI_gv_NU_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
else if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (((libNCUI_gv_nU_HeroPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libNCUI_gv_nU_HeroPanel[1], 1) == true)) || ((libNCUI_gv_nU_HeroPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libNCUI_gv_nU_HeroPanel[2], 1) == true)))) {
libNtve_gf_SetDialogItemAlphaMask(libNCUI_gv_NU_ObjectivePanel, "", PlayerGroupAll());
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCUI.galaxy:3651
libNtve_gf_SetDialogItemAlphaMask(libNCUI_gv_NU_ObjectivePanel, "", PlayerGroupAll());
}
else if (((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == false) || (((libNCUI_gv_nU_HeroPanel[1] == c_invalidDialogControlId) || (DialogControlIsVisible(libNCUI_gv_nU_HeroPanel[1], 1) == false)) && ((libNCUI_gv_nU_HeroPanel[2] == c_invalidDialogControlId) || (DialogControlIsVisible(libNCUI_gv_nU_HeroPanel[2], 1) == false))))) {
libNtve_gf_SetDialogItemAlphaMask(libNCUI_gv_NU_ObjectivePanel, "", PlayerGroupAll());
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:10735
lv_portrait = c_invalidPortraitId;
}
if (((lp_cueSoundOption == libCOMI_ge_MissionTransmissionCueSoundOptions_PlayCueSound) || ((lp_cueSoundOption == libCOMI_ge_MissionTransmissionCueSoundOptions_DefaultCueSoundBehavior) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (lv_portrait != c_invalidPortraitId) && (PortraitVisible(libCOMI_gv_cM_SendTransmissionCampaignPortrait, 1) == false)))) {
libLbty_gf_PlayTransmissionCueSound(PlayerGroupAll());
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:3226
while (true) {
if ((libCOUI_gv_cU_ObjectivePanel != c_invalidDialogControlId) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (libCOMI_gf_GameIsOver() == false)) {
if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (libCOUI_gv_cU_HeroPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libCOUI_gv_cU_HeroPanel[1], 1) == true) && (libCOUI_gv_cU_HeroPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libCOUI_gv_cU_HeroPanel[2], 1) == true)) {
libNtve_gf_SetDialogItemAlphaMask(libCOUI_gv_cU_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:3229
libNtve_gf_SetDialogItemAlphaMask(libCOUI_gv_cU_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
else if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (((libCOUI_gv_cU_HeroPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libCOUI_gv_cU_HeroPanel[1], 1) == true)) || ((libCOUI_gv_cU_HeroPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libCOUI_gv_cU_HeroPanel[2], 1) == true)))) {
libNtve_gf_SetDialogItemAlphaMask(libCOUI_gv_cU_ObjectivePanel, "@UI/ObjectivePanelMask", PlayerGroupAll());
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:3232
libNtve_gf_SetDialogItemAlphaMask(libCOUI_gv_cU_ObjectivePanel, "@UI/ObjectivePanelMask", PlayerGroupAll());
}
else if (((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == false) || (((libCOUI_gv_cU_HeroPanel[1] == c_invalidDialogControlId) || (DialogControlIsVisible(libCOUI_gv_cU_HeroPanel[1], 1) == false)) && ((libCOUI_gv_cU_HeroPanel[2] == c_invalidDialogControlId) || (DialogControlIsVisible(libCOUI_gv_cU_HeroPanel[2], 1) == false))))) {
libNtve_gf_SetDialogItemAlphaMask(libCOUI_gv_cU_ObjectivePanel, "", PlayerGroupAll());
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:564
lv_portrait = c_invalidPortraitId;
}
if (((lp_cueSoundOption == libA3DDD02B_ge_CampaignTransmissionCueSoundOptions_PlayCueSound) || ((lp_cueSoundOption == libA3DDD02B_ge_CampaignTransmissionCueSoundOptions_DefaultCueSoundBehavior) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (lv_portrait != c_invalidPortraitId) && (PortraitVisible(libA3DDD02B_gv_pP_SendTransmissionCampaignPortrait, 1) == false)))) {
libLbty_gf_PlayTransmissionCueSound(PlayerGroupAll());
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:1539
while (true) {
if ((libA3DDD02B_gv_pP_ObjectivePanel != c_invalidDialogControlId) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (libA3DDD02B_gv_pP_GameOver == false)) {
if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (libA3DDD02B_gv_pP_HeroUIPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libA3DDD02B_gv_pP_HeroUIPanel[1], 1) == true) && (libA3DDD02B_gv_pP_HeroUIPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libA3DDD02B_gv_pP_HeroUIPanel[2], 1) == true)) {
libNtve_gf_SetDialogItemAlphaMask(libA3DDD02B_gv_pP_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:1542
libNtve_gf_SetDialogItemAlphaMask(libA3DDD02B_gv_pP_ObjectivePanel, "@UI/ObjectivePanelMaskTwoHeroes", PlayerGroupAll());
}
else if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true) && (((libA3DDD02B_gv_pP_HeroUIPanel[1] != c_invalidDialogControlId) && (DialogControlIsVisible(libA3DDD02B_gv_pP_HeroUIPanel[1], 1) == true)) || ((libA3DDD02B_gv_pP_HeroUIPanel[2] != c_invalidDialogControlId) && (DialogControlIsVisible(libA3DDD02B_gv_pP_HeroUIPanel[2], 1) == true)))) {
libNtve_gf_SetDialogItemAlphaMask(libA3DDD02B_gv_pP_ObjectivePanel, "@UI/ObjectivePanelMask", PlayerGroupAll());
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:1545
libNtve_gf_SetDialogItemAlphaMask(libA3DDD02B_gv_pP_ObjectivePanel, "@UI/ObjectivePanelMask", PlayerGroupAll());
}
else if (((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == false) || (((libA3DDD02B_gv_pP_HeroUIPanel[1] == c_invalidDialogControlId) || (DialogControlIsVisible(libA3DDD02B_gv_pP_HeroUIPanel[1], 1) == false)) && ((libA3DDD02B_gv_pP_HeroUIPanel[2] == c_invalidDialogControlId) || (DialogControlIsVisible(libA3DDD02B_gv_pP_HeroUIPanel[2], 1) == false))))) {
libNtve_gf_SetDialogItemAlphaMask(libA3DDD02B_gv_pP_ObjectivePanel, "", PlayerGroupAll());
}
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:1579
// Implementation
if ((libA3DDD02B_gv_pP_ErrorPanel != c_invalidDialogControlId) && (libNtve_gf_PlayerInCinematicMode(1) == false) && (libA3DDD02B_gv_pP_GameOver == false)) {
if ((PortraitVisible(libNtve_gf_CinematicPortrait(libNtve_ge_CinematicPortraitPosition_CenterLeft), 1) == true)) {
if ((libA3DDD02B_gv_pP_ErrorPanelMaskOn == false)) {
libA3DDD02B_gv_pP_ErrorPanelMaskOn = true;