<aside> 📦 BARLIB.acs

</aside>

<aside> âš¡ void SetMugshotColorGlow(int cyan, int blue, int black)

</aside>

Usage


By default, when drawing a bar, it will already handle the colors for the base mugshot as well. However, this function can be used to draw a separate mugshot color for the base mugshot from the color being drawn for the bar.

Alternatively, you can use this function to set a mugshot color without even needing to draw a bar!

Parameters

Example


Homing Sniper shows the charge animation on the mugshot while the bar shows a simple overlay bar, the code below is how it accomplishes that.

actor HomingSniperWep_NormalBar : NormalBar { args 192, 230 }
actor HomingSniperWep_ScriptBar : ScriptBar {}
script "DrawBar_HomingSniperWep" (void) {
    if(GetUserCvar(ConsolePlayerNumber(),"mm8bdm_usechargebars")) {
        if(CheckInventory("WeaponChargeLevel") >= 2) {
            if(Timer() % 3 == 1) {
                SetMugshotColorGlow(0,192,230);
            } else if (Timer() % 3 == 2) {
                SetMugshotColorGlow(230,0,192);
            } else if (Timer() % 3 == 0) {
                SetMugshotColor(192,230);
            }
        } else if(CheckInventory("WeaponChargeLevel") >= 1) {
            if(Timer() % 2 == 1) {
                SetMugshotColorGlow(192,230,26);
            } else {
                SetMugshotColor(192,230);
            }
        } else {
            SetMugshotColor(192,230);
        }
    } else {
        SetMugshotColor(192,230);
    }
    if(CheckInventory("HomingSniperCharge") > 0) SetOverlayBar(CheckInventory("HomingSniperCharge"), 4);
}

See Also


SetMugshotColor