Animated HUD.

Author Topic: Animated HUD.  (Read 2478 times)

Get on the content creator discord if you need help. More reliable then here.

They ignore me there too lol I already asked on there.

then nobody is free enough or interested in doing this for you. we have a general lack of gui programmers so unfortunately its hard to get help for non-center/bottomprint gui stuff

Well health percentage is already defined I just need to figure out how to change the icon at a specific percent.



Use a switch statement, I forget the exact syntax in Torque, but something like this should work:
Code: [Select]
%healthBitmap = "";

switch(mFloor(%health / 20))
{
    case 5: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/100%health>"; break;
    case 4: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/80%health>"; break;
    case 3: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/60%health>"; break;
    case 2: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/40%health>"; break;
    case 1: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/20%health>"; break;
    default: %healthBitmap = "Dead";
}

 commandToClient(%client, 'bottomPrint', ... %healthBitmap ... );



Use a switch statement, I forget the exact syntax in Torque, but something like this should work:
Code: [Select]
%healthBitmap = "";

switch(mFloor(%health / 20))
{
    case 5: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/100%health>"; break;
    case 4: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/80%health>"; break;
    case 3: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/60%health>"; break;
    case 2: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/40%health>"; break;
    case 1: %healthBitmap = "<bitmap:Add-Ons/server_totalrpg/20%health>"; break;
    default: %healthBitmap = "Dead";
}

 commandToClient(%client, 'bottomPrint', ... %healthBitmap ... );

I'll try it but I think my script needs more coding than that.

are you just trying to change the image in the bottomprint, or a whole new spot?

also, for those cutoffs it's probably better to use if statements than a switch

What do you need Tony? I've been resurrected from the dead to help you :P

are you just trying to change the image in the bottomprint, or a whole new spot?

also, for those cutoffs it is better to use if statements than a switch
« Last Edit: November 20, 2018, 01:44:52 PM by jes00 »

What do you need Tony? I've been resurrected from the dead to help you :P


I think someone else got it for me, they send me a PM about it but I haven't tried it yet but I'll let ya know.