# Set Opacity

Grammar — SetOpacity opacity blendDuration
FlagsFunction

Constructs and returns a SetOpacity actor message based on the parameters. This message sets an actor*“s opacity to the Opacity parameter value. The available range 0 to 1. The Blend Duration parameter determines how long it should take to blend from the actor”*s current opacity to the desired opacity. If the Blend Duration parameter is left at 0, it will change opacity instantly.

# Arguments

  • fixed — Opacity
  • fixed — Blend Duration

Returns — string<actormsg>

string libNtve_gf_SetOpacity(
	fixed lp_opacity,
	fixed lp_blendDuration,
);

Category: Actor / Message Constructors

# Examples

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionultralisk.sc2map/MapScript.galaxy:328

    // Implementation
    libNtve_gf_CreateModelAtPoint("PoisonGasCloud", lp_location);
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(0.0, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetScale(1.3, 1.3, 1.3, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(1.0, 5.0));

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionultralisk.sc2map/MapScript.galaxy:330

    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(0.0, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetScale(1.3, 1.3, 1.3, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(1.0, 5.0));
    return true;
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionultralisk.sc2map/MapScript.galaxy:358

    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetScale(1.5, 1.5, 1.5, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetTintColor(Color(100.00, 50.20, 25.10), 1.5, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(0.0, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(1.0, 5.0));
    return true;

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionultralisk.sc2map/MapScript.galaxy:359

    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetTintColor(Color(100.00, 50.20, 25.10), 1.5, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(0.0, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(1.0, 5.0));
    return true;
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionultralisk.sc2mapMapScript.galaxy:328

    // Implementation
    libNtve_gf_CreateModelAtPoint("PoisonGasCloud", lp_location);
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(0.0, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetScale(1.3, 1.3, 1.3, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(1.0, 5.0));

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionultralisk.sc2mapMapScript.galaxy:330

    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(0.0, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetScale(1.3, 1.3, 1.3, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(1.0, 5.0));
    return true;
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionultralisk.sc2mapMapScript.galaxy:358

    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetScale(1.5, 1.5, 1.5, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetTintColor(Color(100.00, 50.20, 25.10), 1.5, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(0.0, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(1.0, 5.0));
    return true;

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionultralisk.sc2mapMapScript.galaxy:359

    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetTintColor(Color(100.00, 50.20, 25.10), 1.5, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(0.0, 0.0));
    ActorSend(libNtve_gf_ActorLastCreated(), libNtve_gf_SetOpacity(1.0, 5.0));
    return true;
}

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pcampaigntest.sc2map/MapScript.galaxy:468

    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        libNtve_gf_MakeUnitInvulnerable(UnitGroupLoopCurrent(), true);
        ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetOpacity(0.75, 0));
        ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetTintColor(Color(0.00, 0.00, 100.00), 1.0, 0.0));
    }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pcampaigntest.sc2map/MapScript.galaxy:494

            }
        }
        ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetOpacity(0.75, 0));
    }
    UnitGroupLoopEnd();

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pcampaigntest.sc2map/MapScript.galaxy:890

        }
    }
    ActorSend(libNtve_gf_MainActorofUnit(EventUnit()), libNtve_gf_SetOpacity(0.75, 0));
    return true;
}

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pcampaigntest.sc2map/MapScript.galaxy:937

        }
    }
    ActorSend(libNtve_gf_MainActorofUnit(EventUnit()), libNtve_gf_SetOpacity(0.75, 0));
    return true;
}

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pcampaigntest.sc2map/MapScript.galaxy:1050

        if ((UnitGetOwner(UnitGroupLoopCurrent()) == gv_pLAYER_01_USER)) {
            if ((libNtve_gf_UnitInRegion(UnitGroupLoopCurrent(), RegionFromId(1)) == true)) {
                ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetOpacity(0.75, 0));
                ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetTintColor(Color(0.00, 0.00, 100.00), 1.0, 0.0));
            }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pcampaigntest.sc2map/MapScript.galaxy:1054

            }
            else {
                ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetOpacity(1.0, 0));
                ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetTintColor(Color(100.00, 100.00, 100.00), 1.0, 0.0));
            }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pcampaigntest.sc2mapMapScript.galaxy:468

    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        libNtve_gf_MakeUnitInvulnerable(UnitGroupLoopCurrent(), true);
        ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetOpacity(0.75, 0));
        ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetTintColor(Color(0.00, 0.00, 100.00), 1.0, 0.0));
    }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pcampaigntest.sc2mapMapScript.galaxy:494

            }
        }
        ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetOpacity(0.75, 0));
    }
    UnitGroupLoopEnd();

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pcampaigntest.sc2mapMapScript.galaxy:890

        }
    }
    ActorSend(libNtve_gf_MainActorofUnit(EventUnit()), libNtve_gf_SetOpacity(0.75, 0));
    return true;
}

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pcampaigntest.sc2mapMapScript.galaxy:937

        }
    }
    ActorSend(libNtve_gf_MainActorofUnit(EventUnit()), libNtve_gf_SetOpacity(0.75, 0));
    return true;
}

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pcampaigntest.sc2mapMapScript.galaxy:1050

        if ((UnitGetOwner(UnitGroupLoopCurrent()) == gv_pLAYER_01_USER)) {
            if ((libNtve_gf_UnitInRegion(UnitGroupLoopCurrent(), RegionFromId(1)) == true)) {
                ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetOpacity(0.75, 0));
                ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetTintColor(Color(0.00, 0.00, 100.00), 1.0, 0.0));
            }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pcampaigntest.sc2mapMapScript.galaxy:1054

            }
            else {
                ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetOpacity(1.0, 0));
                ActorSend(libNtve_gf_MainActorofUnit(UnitGroupLoopCurrent()), libNtve_gf_SetTintColor(Color(100.00, 100.00, 100.00), 1.0, 0.0));
            }

mods/heromods/auriel.stormmodbase.stormdata/LibHAUR.galaxy:1128

        }
        ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer]), libNtve_gf_ModelSwap("HitTestFuzzy_Cyliner", 0));
        ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer]), libNtve_gf_SetOpacity(0.0, 0));
        ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer]), libNtve_gf_SetScale(2.0, 2.0, 4.5, 0.0));
        ActorSend(libNtve_gf_MainActorofUnit(libHAUR_gv_heroAurielResurrectSpirit[lv_deadPlayer]), libNtve_gf_SetHeight(1.0));

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:1620

    UnitAbilityEnable(lp_unit, "attack", false);
    UnitAbilityEnable(lp_unit, "move", false);
    ActorSend(libNtve_gf_MainActorofUnit(lp_unit), libNtve_gf_SetOpacity(0.0, 0));
    ActorSend(libNtve_gf_MainActorofUnit(lp_unit), libNtve_gf_SetOpacity(1.0, 2.0));
    UnitBehaviorAdd(lp_unit, "ProtossGenericWarpInOut", lp_unit, 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:1621

    UnitAbilityEnable(lp_unit, "move", false);
    ActorSend(libNtve_gf_MainActorofUnit(lp_unit), libNtve_gf_SetOpacity(0.0, 0));
    ActorSend(libNtve_gf_MainActorofUnit(lp_unit), libNtve_gf_SetOpacity(1.0, 2.0));
    UnitBehaviorAdd(lp_unit, "ProtossGenericWarpInOut", lp_unit, 1);
    Wait(2.0, c_timeGame);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:1625

    Wait(2.0, c_timeGame);
    UnitBehaviorRemove(lp_unit, "ProtossGenericWarpInOut", 1);
    ActorSend(libNtve_gf_MainActorofUnit(lp_unit), libNtve_gf_SetOpacity(1.0, 0.0));
    UnitAbilityEnable(lp_unit, "attack", true);
    UnitAbilityEnable(lp_unit, "move", true);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3344

    UnitAbilityEnable(UnitLastCreated(), "attack", false);
    UnitAbilityEnable(UnitLastCreated(), "move", false);
    ActorSend(libNtve_gf_MainActorofUnit(UnitLastCreated()), libNtve_gf_SetOpacity(0.0, 0));
    ActorSend(libNtve_gf_MainActorofUnit(UnitLastCreated()), libNtve_gf_SetOpacity(1.0, 2.0));
    UnitBehaviorAdd(UnitLastCreated(), "ProtossGenericWarpInOut", UnitLastCreated(), 1);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3345

    UnitAbilityEnable(UnitLastCreated(), "move", false);
    ActorSend(libNtve_gf_MainActorofUnit(UnitLastCreated()), libNtve_gf_SetOpacity(0.0, 0));
    ActorSend(libNtve_gf_MainActorofUnit(UnitLastCreated()), libNtve_gf_SetOpacity(1.0, 2.0));
    UnitBehaviorAdd(UnitLastCreated(), "ProtossGenericWarpInOut", UnitLastCreated(), 1);
    Wait(2.0, c_timeAI);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:3349

    Wait(2.0, c_timeAI);
    UnitBehaviorRemove(UnitLastCreated(), "ProtossGenericWarpInOut", 1);
    ActorSend(libNtve_gf_MainActorofUnit(UnitLastCreated()), libNtve_gf_SetOpacity(1.0, 0.0));
    UnitAbilityEnable(UnitLastCreated(), "attack", true);
    UnitAbilityEnable(UnitLastCreated(), "move", true);