Servus,
Ich habe ein kleines Problem mit unserer Status Bar,
Hier ein Bild
Spoiler anzeigen
Und zwar soll normal in den 3 Balken unten ein Roter, Grüner und ein Blauer Balken erscheinen.
Das ist aber wie man sieht nicht der Fall,
Außerdem kommt zu der HUD eine kleine Fehlermeldung ich weiß
jetzt nicht ob die etwas damit zu tuen hat.
Hier ein Bild:
Spoiler anzeigen
Ich habe bis jetzt nur die hud_stats.hpp geändert.
hud_stats.hpp
Spoiler anzeigen
#define ST_CENTER 0x02
/*
Author: Daniel Stuart
File: hud_stats.hpp
*/
class playerHUD {
idd = -1;
duration = 10e10;
movingEnable = 0;
fadein = 0;
fadeout = 0;
name = "playerHUD";
onLoad = "uiNamespace setVariable ['playerHUD',_this select 0]";
objects[] = {};
controls[] = {
LIFE_MeinLogo,
Life_RscBackground_HUD,
Life_IcoFood,
Life_RscProgress_HUDFood,
Life_IcoHealth,
Life_RscProgress_HUDHealth,
Life_IcoThirst,
Life_RscProgress_HUDWater,
Life_RscText_HUDFood,
Life_RscText_HUDHealth,
Life_RscText_HUDWater
};
/* LOGO */
class LIFE_MeinLogo: Life_RscPicture
{
idc = -1;
text = "icons\logo.paa";
style = 48 + 0x800;
x = safezoneX;
y = safezoneY;
w = 0.2 * safezoneW;
h = 0.2 * safezoneH;
}
/* Background */
class Life_RscBackground_HUD: Life_RscBackground {
idc = -1;
x = safezoneX;
y = safezoneY + safezoneH - 0.1;
w = safezoneW;
h = 0.1;
colorBackground[] = { 0, 0, 0, 0.1 };
};
/* Progress Bars */
class LIFE_RscProgress_HUDCommon: Life_RscProgress {
colorFrame[] = {0, 0, 0, 0.8};
y = 0.972223 * safezoneH + safezoneY;
w = 0.0462964 * safezoneW;
h = 0.0222222 * safezoneH;
};
class Life_IcoFood : Life_RscPicture {
idc = -1;
text = "icons\food.paa";
style = 48 + 0x800;
x = 0.35000 * safezoneW + safezoneX;
y = 0.95200 * safezoneH + safezoneY;
w = 0.02500 * safezoneW;
h = 0.02500 * safezoneH;
};
class Life_RscProgress_HUDFood: LIFE_RscProgress_HUDCommon {
idc = 5101;
x = 0.38000 * safezoneW + safezoneX;
y = 0.96000 * safezoneH + safezoneY;
w = 0.10000 * safezoneW;
h = 0.01250 * safezoneH;
colorBar[] = { 0.78, 0.52, 0.30, 1 };
colorBackground[] = {-1, -1, -1, -1};
colorFrame[] = {0, 0, 0, 0.75};
};
class Life_IcoHealth : Life_RscPicture {
idc = -1;
text = "icons\heart.paa";
style = 48 + 0x800;
x = 0.50000 * safezoneW + safezoneX;
y = 0.95200 * safezoneH + safezoneY;
w = 0.02500 * safezoneW;
h = 0.02500 * safezoneH;
};
class Life_RscProgress_HUDHealth: LIFE_RscProgress_HUDCommon {
idc = 5102;
x = 0.53000 * safezoneW + safezoneX;
y = 0.96000 * safezoneH + safezoneY;
w = 0.10000 * safezoneW;
h = 0.01250 * safezoneH;
colorBar[] = { 0.83, 0.10, 0, 1 };
colorBackground[] = {-1, -1, -1, -1};
colorFrame[] = {0, 0, 0, 0.75};
};
class Life_IcoThirst : Life_RscPicture {
idc = -1;
text = "icons\water.paa";
style = 48 + 0x800;
x = 0.20000 * safezoneW + safezoneX;
y = 0.95200 * safezoneH + safezoneY;
w = 0.02500 * safezoneW;
h = 0.02500 * safezoneH;
colorBackground[] = {-1, -1, -1, -1};
};
class Life_RscProgress_HUDWater: LIFE_RscProgress_HUDCommon {
idc = 5100;
x = 0.23000 * safezoneW + safezoneX;
y = 0.96000 * safezoneH + safezoneY;
w = 0.10000 * safezoneW;
h = 0.01250 * safezoneH;
colorBar[] = { 0.20, 0.24, 0.68, 1 };
colorBackground[] = {-1, -1, -1, -1};
colorFrame[] = {0, 0, 0, 0.75};
};
};
fn_hudUpdate.sqf
Spoiler anzeigen
#include "..\..\script_macros.hpp"
/*
File: fn_hudUpdate.sqf
Author: Daniel Stuart
Description:
Updates the HUD when it needs to.
*/
disableSerialization;
if (isNull LIFEdisplay) then {[] call life_fnc_hudSetup;};
LIFEctrl(2200) progressSetPosition (life_hunger / 100);
LIFEctrl(2201) progressSetPosition (1 - (damage player));
LIFEctrl(2202) progressSetPosition (life_thirst / 100);
Währe Cool wen mir jemand helfen könnte
Freundliche Grüße
Leon