Ich hatte noch eine alte Missiondatei von mir und hatte damals eine StatusBar eingebaut von altisliferpg.com irgendwas.
Jedoch wollte ich jetzt eine andere. Aber es klappt einfach net die StatusBar will einfach nicht funktioniere.
Hätte wer eine Idee?
Habe wie gesagt jetzt die Standard Essens/Trinken Anzeige gemacht klappt auch nicht.
Meine hudSetup.sqf
Code
/*
File: fn_hudSetup.sqf
Author: Bryan "Tonic" Boardwine
Description:
Setups the hud for the player?
*/
private["_display","_alpha","_version","_p","_pg"];
disableSerialization;
_display = findDisplay 46;
_alpha = _display displayCtrl 1001;
_version = _display displayCtrl 1000;
2 cutRsc ["playerHUD","PLAIN"];
_version ctrlSetText format["BETA: 0.%1.%2",(productVersion select 2),(productVersion select 3)];
[] call life_fnc_hudUpdate;
[] spawn
{
private["_dam"];
while {true} do
{
_dam = damage player;
waitUntil {(damage player) != _dam};
[] call life_fnc_hudUpdate;
};
};
Alles anzeigen
Meine hudUpdate.sqf
Code
/*
File: fn_hudUpdate.sqf
Author: Bryan "Tonic" Boardwine
Description:
Updates the HUD when it needs to.
*/
private["_ui","_food","_water","_health"];
disableSerialization;
_ui = uiNameSpace getVariable ["playerHUD",displayNull];
if(isNull _ui) then {[] call life_fnc_hudSetup;};
_food = _ui displayCtrl 23500;
_water = _ui displayCtrl 23510;
_health = _ui displayCtrl 23515;
//Update food
_food ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.548];
_food ctrlSetText format["%1", life_hunger];
_food ctrlCommit 0;
//Update Water
_water ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.502];
_water ctrlSetText format["%1", life_thirst];
_water ctrlCommit 0;
//Update Health
_health ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.456];
_health ctrlSetText format["%1", round((1 - (damage player)) * 100)];
_health ctrlCommit 0;
Alles anzeigen
Meine ui.hpp
Code
class playerHUD
{
idd=-1;
movingEnable=0;
fadein=0;
duration = 99999999999999999999999999999999999999999999;
fadeout=0;
name="playerHUD";
onLoad="uiNamespace setVariable ['playerHUD',_this select 0]";
objects[]={};
class controlsBackground
{
class foodHIcon : life_RscPicture
{
idc = -1;
text = "icons\food.paa";
x = safeZoneX+safeZoneW-0.115; y = safeZoneY+safeZoneH-0.54;
w = 0.03; h = 0.04;
};
class waterHIcon : life_RscPicture
{
idc = -1;
text = "icons\water.paa";
x = safeZoneX+safeZoneW-0.12; y = safeZoneY+safeZoneH-0.50;
w = 0.04; h = 0.04;
};
class healthHIcon : life_RscPicture
{
idc = -1;
text = "icons\health.paa";
x = safeZoneX+safeZoneW-0.11; y = safeZoneY+safeZoneH-0.445;
w = 0.02; h = 0.03;
};
};
class controls
{
class foodtext
{
type=0;
idc=23500;
style=0;
x=-1;
y=-1;
w=0.3;
h=0.05;
sizeEx=0.03;
size=1;
font="PuristaSemibold";
colorBackground[]={0,0,0,0};
colorText[] = { 1 , 1 , 1 , 1 };
shadow=true;
text="";
};
class watertext
{
type=0;
idc=23510;
style=0;
x=-1;
y=-1;
w=0.3;
h=0.05;
sizeEx=0.03;
size=1;
font="PuristaSemibold";
colorBackground[]={0,0,0,0};
colorText[] = { 1 , 1 , 1 , 1 };
shadow=true;
text="";
};
class healthtext
{
type=0;
idc=23515;
style=0;
x=-1;
y=-1;
w=0.3;
h=0.05;
sizeEx=0.03;
size=1;
font="PuristaSemibold";
colorBackground[]={0,0,0,0};
colorText[] = { 1 , 1 , 1 , 1 };
shadow=true;
text="";
};
};
};
Alles anzeigen
Natürlich ist das auch alles eingetragen in der MasterHandler die ui.hpp und in der description.ext
Meine LogFiles sind angehängt.
Bin einfach am Ende.
Freue mich über jede Hilfe.