# Texture Select By Slot

Grammar — TextureSelectBySlot slotName.slotComponent textureExpression
FlagsNative | Function

Constructs and returns a TextureSelectBySlot actor message. Select a texture into a texture slot based on the specified texture expression. Works on actors with a model.

# Arguments

  • string — Slot Name
  • int — Slot Component
  • string — Texture Expression

Returns — string<actormsg>

native string MakeMsgTextureSelectBySlot(
	string slotName,
	int slotComponent,
	string textureExpression,
);

Category: Actor / Message Constructors

# Examples

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:5450

    libNtve_gf_SendActorMessageToUnit(lp_unit, libNtve_gf_ModelSwap(lp_model, lp_percent));
    if ((StringLength(lp_textures) > 0)) {
        libNtve_gf_SendActorMessageToUnit(lp_unit, MakeMsgTextureSelectBySlot("main", c_textureSlotComponentDefault, ("BestMatch " + lp_textures)));
    }

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:4642

    libNtve_gf_SendActorMessageToUnit(lp_unit, libNtve_gf_ModelSwap(lp_model, lp_percent));
    if ((StringLength(lp_textures) > 0)) {
        libNtve_gf_SendActorMessageToUnit(lp_unit, MakeMsgTextureSelectBySlot("main", c_textureSlotComponentDefault, ("BestMatch " + lp_textures)));
    }