[The HudBot skins thread]

sshot0010.jpg

Somthing I took a little more time on. I however did not spend much time at all on that disc lol ;)
 
Yep, might have thats what I used. With a little tweeking to get it to fit right. Still looks nice I though :p

Edit: I used about 3 dif. wallpapers to get all the stuff I thought looked best.
 
sshot0011.jpg


Disc isnt SO bad now and I made the energy and health bars fit a little better on the boarder. Had to make it a little longer to fit the chat good. Seems to hold a 5 line at 460 pix long chat rather well.
 
UniX said:
BTW SarcaStick I know how much you HATE my few min work but maybe you will like this one ;) http://www.angelfire.com/un/unix2/sshot0013.jpg
:lol: nice. and Thx :bigthumb::bigthumb:

seakigng (<--alcohol still typing for me) Speaking of weapons huds, i wish i still had the one cyclonize made for me that i modded.

Anywho, someone needs to make a new weapons hud again.
the default weapons hud is ass compared to what everything else will look like.
 
Last edited:
I am done with tribes but I made a weapon hud a while back. it has a couple bugs but they should be easy for someone else to fix.

weaponhud.png


Code:
$weaponName[1] = "ELF Gun";
$weaponName[2] = "Laser Rifle";
$weaponName[3] = "Disc Launcher";
$weaponName[4] = "Mortar";
$weaponName[5] = "Grenade Launcher";
$weaponName[6] = "Plasma Gun";
$weaponName[7] = "Chaingun";
$weaponName[8] = "Blaster";

$weaponIDtoName[25] = "Repair Gun";
$weaponIDtoName[24] = "ELF Gun";
$weaponIDtoName[22] = "Laser Rifle";
$weaponIDtoName[21] = "Disc Launcher";
$weaponIDtoName[19] = "Mortar";
$weaponIDtoName[17] = "Grenade Launcher";
$weaponIDtoName[15] = "Plasma Gun";
$weaponIDtoName[13] = "Chaingun";
$weaponIDtoName[11] = "Blaster";

$ammoIDtoName[20] = "Disc";
$ammoIDtoName[18] = "Mortar Ammo";
$ammoIDtoName[16] = "Grenade Ammo";
$ammoIDtoName[14] = "Plasma Bolt";
$ammoIDtoName[12] = "Bullet";

$weaponAmmo[24] = "Energy";
$weaponAmmo[22] = "Energy";
$weaponAmmo[21] = "Disc";
$weaponAmmo[19] = "Mortar Ammo";
$weaponAmmo[17] = "Grenade Ammo";
$weaponAmmo[15] = "Plasma Bolt";
$weaponAmmo[13] = "Bullet";
$weaponAmmo[11] = "Energy";

$weaponAmmoMax[larmor, 24] = "Infinite";
$weaponAmmoMax[larmor, 22] = "Infinite";
$weaponAmmoMax[larmor, 21] = "15 30";
$weaponAmmoMax[larmor, 19] = "10 20";
$weaponAmmoMax[larmor, 17] = "10 25";
$weaponAmmoMax[larmor, 15] = "30 60";
$weaponAmmoMax[larmor, 13] = "100 250";
$weaponAmmoMax[larmor, 11] = "Infinite";
$weaponAmmoMax[marmor, 24] = "Infinite";
$weaponAmmoMax[marmor, 22] = "Infinite";
$weaponAmmoMax[marmor, 21] = "15 30";
$weaponAmmoMax[marmor, 19] = "10 20";
$weaponAmmoMax[marmor, 17] = "10 25";
$weaponAmmoMax[marmor, 15] = "40 70";
$weaponAmmoMax[marmor, 13] = "150 300";
$weaponAmmoMax[marmor, 11] = "Infinite";
$weaponAmmoMax[harmor, 24] = "Infinite";
$weaponAmmoMax[harmor, 22] = "Infinite";
$weaponAmmoMax[harmor, 21] = "15 30";
$weaponAmmoMax[harmor, 19] = "10 20";
$weaponAmmoMax[harmor, 17] = "15 30";
$weaponAmmoMax[harmor, 15] = "50 80";
$weaponAmmoMax[harmor, 13] = "200 350";
$weaponAmmoMax[harmor, 11] = "Infinite";

$weaponBMP["ELF Gun"] = "elf";
$weaponBMP["Laser Rifle"] = "laser";
$weaponBMP["Disc Launcher"] = "disc";
$weaponBMP["Mortar"] = "mortar";
$weaponBMP["Grenade Launcher"] = "nade";
$weaponBMP["Plasma Gun"] = "plasma";
$weaponBMP["Chaingun"] = "chain";
$weaponBMP["Blaster"] = "blaster";

$isWeapon["Weapon"] = true;
$isWeapon["ELF Gun"] = true;
$isWeapon["Laser Rifle"] = true;
$isWeapon["Disc Launcher"] = true;
$isWeapon["Mortar"] = true;
$isWeapon["Grenade Launcher"] = true;
$isWeapon["Plasma Gun"] = true;
$isWeapon["Chaingun"] = true;
$isWeapon["Blaster"] = true;

function WeaponHud::Create() {
    $weaponHud = newObject(WeapHud, SimGui::Control, getScreenSize(x) - 131, getScreenSize(y) - 999, 150, 56);
    %bg = newObject(weaponHudBG, FearGuiFormattedText, 0, 0, 0, 0);
    %text = newObject(weaponHudTxt, FearGuiFormattedText, 52, 1, 0, 0);
    %bar = newObject(weaponHudBar, FearGuiFormattedText, 2, 8, 0, 0);
    %ammo = newObject(weaponHudAmmo, FearGuiFormattedText, 88, 1, 0, 0);
    %iconbg1 = newObject(weaponHudIconBG1, FearGuiFormattedText, 72, 17, 0, 0);
    %iconbg2 = newObject(weaponHudIconBG2, FearGuiFormattedText, 57, 17, 0, 0);
    %iconbg3 = newObject(weaponHudIconBG3, FearGuiFormattedText, 42, 17, 0, 0);
    %iconbg4 = newObject(weaponHudIconBG4, FearGuiFormattedText, 27, 17, 0, 0);
    %iconbg5 = newObject(weaponHudIconBG5, FearGuiFormattedText, 12, 17, 0, 0);
    %icon1 = newObject(weaponHudIcon1, FearGuiFormattedText, 72, 17, 0, 0);
    %icon2 = newObject(weaponHudIcon2, FearGuiFormattedText, 57, 17, 0, 0);
    %icon3 = newObject(weaponHudIcon3, FearGuiFormattedText, 42, 17, 0, 0);
    %icon4 = newObject(weaponHudIcon4, FearGuiFormattedText, 27, 17, 0, 0);
    %icon5 = newObject(weaponHudIcon5, FearGuiFormattedText, 12, 17, 0, 0);
    addToSet($weaponHud, %bg);
    addToSet($weaponHud, %text);
    addToSet($weaponHud, %bar);
    addToSet($weaponHud, %ammo);
    for(%i = 1; %i <= 5; %i++) {
        addToSet($weaponHud, %iconbg[%i]);
        Control::setValue("weaponHudIconBG"@ %i, "<b0,0:bmp\\whuditrans.bmp>");
        Control::setVisible("weaponHudIconBG"@ %i, false);
    }
    for(%i = 1; %i <= 5; %i++)
        addToSet($weaponHud, %icon[%i]);
    addToSet(playGui, $weaponHud);
    $weaponHudExists = 1;
    Control::setValue(weaponHudBG, "<b0,0:bmp\\whudtrans.bmp>");
    Control::setValue(weaponHudTxt, "<b0,0:bmp\\whudtext.bmp>");
    Control::setValue(weaponHudBar, "<b0,0:bmp\\whudbar84.bmp>");
}

function WeaponHud::countWeapons() {
    %weapCount = 0;
    if((%weapMounted = $weaponIDtoName[getmountedItem(0)]) == "Repair Gun")
        return;
    for(%i = 1; %i <= 8; %i++)
        if(getItemCount($weaponName[%i])) {
            if($weaponName[%i] == %weapMounted)
                %weapSlot[%n++] = $weaponBMP[$weaponName[%i]] @"_on";
            else
                %weapSlot[%n++] = $weaponBMP[$weaponName[%i]] @"_off";
            %weapCount++;
        }
    if(%weapCount)
        for(%i = 1; %i <= %weapCount; %i++)
            Control::setVisible("weaponHudIconBG"@ %i, true);
    for(%i = 5; %i > %weapCount; %i--) {
        Control::setVisible("weaponHudIconBG"@ %i, false);
        Control::setValue("weaponHudIcon"@ %i, "");
        %weapSlot[%i] = ""; // safety net, just in case..
    }
    for(%i = 1; %i <= %weapCount; %i++)
        Control::setValue("weaponHudIcon"@ %i, "<b0,0:bmp\\"@ %weapSlot[%i] @".bmp>");
}

function WeaponHud::countAmmo() {
    if((%weapon = getMountedItem(0)) == -1) {
        Control::setValue(weaponHudAmmo, "<f2>\t0");
        Control::setValue(weaponHudBar, "<b0,0:bmp\\whudbar0.bmp>");
        return;
    }
    if(%weapon == 25)
        return;
    %ammoType = $weaponAmmo[%weapon];
    %ammo = getItemCount(%ammoType);
    if(%ammoType == "Energy") {
        Control::setValue(weaponHudAmmo, "<b1,7:bmp\\whudinf.bmp>");
        Control::setValue(weaponHudBar, "<b0,0:bmp\\whudbar84.bmp>");
        return;
    }
    else if(String::len(%ammo) == 1)
        Control::setValue(weaponHudAmmo, "<f2>\t"@ %ammo);
    else if(String::len(%ammo) == 2)
        Control::setValue(weaponHudAmmo, "<f2><l1>"@ %ammo);
    else
        Control::setValue(weaponHudAmmo, "<f2>"@ %ammo);
    if(getItemCount("Light Armor"))
        Control::setValue(weaponHudBar, "<b0,0:bmp\\whudbar"@ floor((%ammo / getWord($weaponAmmoMax[larmor, %weapon], (getMountedItem(1) == 34))) * 84) @".bmp>");
    else if(getItemCount("Medium Armor"))
        Control::setValue(weaponHudBar, "<b0,0:bmp\\whudbar"@ floor((%ammo / getWord($weaponAmmoMax[marmor, %weapon], (getMountedItem(1) == 34))) * 84) @".bmp>");
    else if(getItemCount("Heavy Armor"))
        Control::setValue(weaponHudBar, "<b0,0:bmp\\whudbar"@ floor((%ammo / getWord($weaponAmmoMax[harmor, %weapon], (getMountedItem(1) == 34))) * 84) @".bmp>");
}

function WeaponHud::onFirePressed() {
    WeaponHud::countAmmo();
    schedule::add("WeaponHud::onFirePressed();", 0.1, ammocount);
}

function WeaponHud::onFireReleased() {
    WeaponHud::countAmmo();
    schedule::cancel(ammocount);
}

function WeaponHud::onSwithWeapon(%weapon) {
    if(%weapon == getmountedItem(0)) {
        schedule("WeaponHud::onSwithWeapon("@ %weapon @");", 0.1);
        return;
    }
    schedule("WeaponHud::countWeapons();", 0.1);
    schedule("WeaponHud::countAmmo();", 0.1);
}

function WeaponHud::onUseItem(%item) {
    if($isWeapon[%item] || $weaponIDtoName[%item] != "")
        WeaponHud::onSwithWeapon(getItemType(%item));
}

function WeaponHud::onDropItem(%item) {
    if($isWeapon[%item] || $weaponIDtoName[%item] != "") {
        schedule("WeaponHud::countWeapons();", 0.1);
        schedule("weaponHud::countAmmo();", 0.1);
    }
    else if(%item == "Ammo" || ($weaponAmmo[getMountedItem(0)] == %item || $weaponAmmo[getMountedItem(0)] == $ammoIDtoName[%item]))
        schedule("weaponHud::countAmmo();", 0.1);
}

function WeaponHud::onItemReceived(%item, %count) {
    if($isWeapon[%item]) {
        schedule("WeaponHud::countWeapons();", 0.1);
        schedule("weaponHud::countAmmo();", 0.1);
    }
    else if($weaponAmmo[getMountedItem(0)] == %item)
        schedule("weaponHud::countAmmo();", 0.1);
}

function WeaponHud::Destroy() {
    removeFromSet(playGui, $weaponHud);
}

Event::Attach(eventLoadPlayGui, WeaponHud::Create);
Event::Attach(eventConnected, nextWeapon);
Event::Attach(eventFirePressed, WeaponHud::onFirePressed);
Event::Attach(eventFireReleased, WeaponHud::onFireReleased);
Event::Attach(eventSwitchWeapon, WeaponHud::onSwithWeapon);
Event::Attach(eventUseItem, WeaponHud::onUseItem);
Event::Attach(eventDropItem, WeaponHud::onDropItem);
Event::Attach(eventItemReceived, WeaponHud::onItemReceived);
Event::Attach(eventExit, WeaponHud::Destroy);

bitmaps
 
Back
Top