# Set Portrait Position
Grammar — Set Portrait position to (OffsetX, OffsetY|OffsetY) related to Anchor
Flags —Native
|Action
Sets a portrait’s position on the screen.
# Arguments
int
<portrait> — Portraitint
<preset::Anchor> — Anchorint
— OffsetXint
— OffsetY
Returns — void
native void PortraitSetPosition(
int p,
int anchor,
int offsetX,
int offsetY,
);
# Related
Category: Portrait / Advanced
- Destroy All Portraits —
void
— PortraitDestroyAll - Destroy Portrait —
void
— PortraitDestroy - Play Portrait Animation —
void
— libNtve_gf_PortraitSetAnim - Set Portrait Camera —
void
— PortraitSetCamera - Set Portrait Border Texture —
void
— PortraitSetBorderTexture - Set Portrait Light —
void
— PortraitSetLight - Set Portrait Model —
void
— PortraitSetModel - Set Portrait Model And Play Animation —
void
— PortraitSetModelAnim - Set Portrait Position —
void
— PortraitSetPosition - Set Portrait Size —
void
— PortraitSetSize - Set Portrait Transition Model —
void
— PortraitSetTransitionModel - Set Portrait Mouse Target —
void
— PortraitSetMouseTarget - Set Portrait Channel —
void
— PortraitSetChannel - Set Portrait Render Type —
void
— PortraitSetRenderType - Mute/Unmute Portrait —
void
— PortraitSetMuted - Pause/Unpause Portrait —
void
— PortraitSetPaused - Set Portrait Tint Color —
void
— PortraitSetTintColor - Set Portrait Team Color —
void
— PortraitSetTeamColor - Set Portrait Actor —
void
— PortraitSetActor - Turn Portrait Border On/Off —
void
— PortraitSetBorderVisible - Turn Portrait Background On/Off —
void
— PortraitSetBackgroundVisible - Turn Portrait Fullscreen On/Off —
void
— PortraitSetFullscreen - Turn Portrait Offscreen On/Off —
void
— PortraitSetOffscreen - Turn Portrait Transition On/Off —
void
— PortraitUseTransition - Force Portrait Transition On/Off —
void
— PortraitForceTransition - Clear Portrait Animation —
void
— libNtve_gf_ClearPortraitAnimation - Wait For Portrait To Load —
void
— PortraitWaitForLoad
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:3299
void gf_MoveNewItemFlashInstant (int lp_newItemIndex) {
// Implementation
PortraitSetPosition(gv_newItems[lp_newItemIndex].lv_flash, c_anchorTopLeft, 0, (DialogGetOffsetY(gv_newItems[lp_newItemIndex].lv_dialog) + 20));
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:3299
void gf_MoveNewItemFlashInstant (int lp_newItemIndex) {
// Implementation
PortraitSetPosition(gv_newItems[lp_newItemIndex].lv_flash, c_anchorTopLeft, 0, (DialogGetOffsetY(gv_newItems[lp_newItemIndex].lv_dialog) + 20));
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:1563
GameSetLighting(lv_light, 0.0);
libSwaC_gv_zS_PlanetPortraitEvoMissionLight = lp_light;
PortraitSetPosition(libSwaC_gv_zS_PlanetPortrait, c_anchorTopLeft, 0, 0);
PortraitSetFullscreen(libSwaC_gv_zS_PlanetPortrait, true);
PortraitSetOffscreen(libSwaC_gv_zS_PlanetPortrait, false);
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2023
PortraitSetLight(libVCMI_gv_pM_PlanetPortrait, lp_light);
GameSetLighting(lp_light, 0.0);
PortraitSetPosition(libVCMI_gv_pM_PlanetPortrait, c_anchorTopLeft, 0, 0);
PortraitSetFullscreen(libVCMI_gv_pM_PlanetPortrait, true);
PortraitSetOffscreen(libVCMI_gv_pM_PlanetPortrait, false);
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:2703
PortraitSetLight(libNCMI_gv_NM_PlanetPortrait, lp_light);
GameSetLighting(lp_light, 0.0);
PortraitSetPosition(libNCMI_gv_NM_PlanetPortrait, c_anchorTopLeft, 0, 0);
PortraitSetFullscreen(libNCMI_gv_NM_PlanetPortrait, true);
PortraitSetOffscreen(libNCMI_gv_NM_PlanetPortrait, false);
mods/voidprologue.sc2mod — base.sc2data/LibA3DDD02B.galaxy:1249
GameSetLighting(lv_light, 0.0);
libA3DDD02B_gv_pP_PlanetPortraitEvoMissionLight = lp_light;
PortraitSetPosition(libA3DDD02B_gv_pP_PlanetPortrait, c_anchorTopLeft, 0, 0);
PortraitSetFullscreen(libA3DDD02B_gv_pP_PlanetPortrait, true);
PortraitSetOffscreen(libA3DDD02B_gv_pP_PlanetPortrait, false);