Download Simple Core Hud

Arch

Legions Developer
Turns the Core Hud into text that can be changed to anything you want.

Download
Place contents in public-test/client/gui/guis/ and set it as 'Read Only'.

To move it change the "position" here
Code:
new GuiControl(coresHud) {
    iContainter = "1";
    profile = "GuiDefaultCoreProfile";
    horizSizing = "right";
    vertSizing = "bottom";
    position = "15 700";  <-- Change this "X Y"
    extent = "200 200";
    visible = "1";
    cameraZRot = "0";
    forceFOV = "0";
    noCursor = "1";
    helpTag = "0";

Glitches a bit when using the overdrive core because that core is technically never considered "inactive."

Pics (bottom left)

Legions%202012-01-23%2022-34-45-80.bmp


Legions%202012-01-23%2022-34-49-54.bmp
 

Arch

Legions Developer
... Then multiply it by 100...
Doi, okay. Oddly, it never reaches 100% but stops at 99.2424%

Image.png


How would I chop off that decimal?
Edit: Fixed the 99.2424% thing by adding
Code:
if(%perc > 99) %perc = 100;
Still don't know how to chop off the decimal.
 

Volt Cruelerz

Legions Developer
this is how. The comments have an example of it

Code:
%a=100-%perc;//.8=100-99.2
%b=1-%a;//    .2=1-.8
%perc-=%b;//  99=99.2-.2
 

Arch

Legions Developer
this is how. The comments have an example of it

Code:
%a=100-%perc;//.8=100-99.2
%b=1-%a;//    .2=1-.8
%perc-=%b;//  99=99.2-.2
Doesn't work. From what I see the reason is is that this will only work when the %a is under 1. Anything over 1 for %a gives you a negative value for %b. Therefore, anything below 99% for the %perc doesn't work. Then it just goes downhill from there.

Edit:
Code:
 %perc = (mCeil((%max - %rem) / %max * 100));
Works perfectly.
 

Volt Cruelerz

Legions Developer
*facepalm*

Sorry about that. Torque has it's own modulus function built in. What you'll want to do is...

Code:
%per=%perc;
%per-=%per % 1;

Then set the value of your GUI element to %per.
 

Arch

Legions Developer
*facepalm*

Sorry about that. Torque has it's own modulus function built in. What you'll want to do is...

Code:
%per=%perc;
%per-=%per % 1;

Then set the value of your GUI element to %per.
"mCeil" does the trick. How would I add that '%' symbol? A new text control? I tried adding it into the text value of the control connected to the cooldownProgess but it just gets replaced by the actual value of the cooldown.
 

Volt Cruelerz

Legions Developer
Is the version above the most recent version of your code? If not, I'd suggest you update it so I can see exactly what you're doing. Adding in that % is very easy to do, but to tell you how to do it requires me seeing the code.
 
Top