# Set Visibility

Grammar — SetVisibility visible|Visibility
FlagsFunction

Constructs and returns a SetVisibility actor message based on the parameters. This message will set the visibility state for the actor*“s model on or off, depending on the visibility parameter value. If set to 0, the model will not show up. If set to 1, the model will show up. Other factors (such as if the model is under the fog of war) can affect an actor”*s visibility – this message cannot force an actor to be visibile if the game engine is causing it to be invisible. The reverse is possible, however – this message can force an actor to be invisible. In other words, invisibility always wins.

# Arguments

  • bool — Visible

Returns — string<actormsg>

string libNtve_gf_SetVisibility(bool lp_visible);

Category: Actor / Message Constructors

# Examples

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zkorhal02.sc2map/MapScript.galaxy:6563

    TriggerExecute(gt_MidCineFakeFieldSounds, true, false);
    ActorSend(ActorFromDoodad(DoodadFromId(284)), libNtve_gf_SetScale(lv_psifieldvisualsize, lv_psifieldvisualsize, 1.0, 0.0));
    ActorSend(ActorFromDoodad(DoodadFromId(284)), libNtve_gf_SetVisibility(true));
    while ((gv_inCinematic == true) && (lv_psifieldvisualsize < (libNtve_gf_WidthOfRegion(RegionFromId(14)) / 2.0))) {
        lv_psifieldvisualsize += (gf_FieldExpandRatetoPoint(8.0, 10.0, CameraInfoGetTarget(CameraInfoFromId(1))) * gv_psifieldupdatefrequency);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zkorhal02.sc2mapMapScript.galaxy:6563

    TriggerExecute(gt_MidCineFakeFieldSounds, true, false);
    ActorSend(ActorFromDoodad(DoodadFromId(284)), libNtve_gf_SetScale(lv_psifieldvisualsize, lv_psifieldvisualsize, 1.0, 0.0));
    ActorSend(ActorFromDoodad(DoodadFromId(284)), libNtve_gf_SetVisibility(true));
    while ((gv_inCinematic == true) && (lv_psifieldvisualsize < (libNtve_gf_WidthOfRegion(RegionFromId(14)) / 2.0))) {
        lv_psifieldvisualsize += (gf_FieldExpandRatetoPoint(8.0, 10.0, CameraInfoGetTarget(CameraInfoFromId(1))) * gv_psifieldupdatefrequency);