Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe

 

ОказалосЬ, что комбат таймер не сложно сделать для этого худа. ))))

Либо в Icon.h, либо там где у Вас задан class RscTitles необходимо добавить:


/*--------------------------------------------*/
class RscPicture_12101: RscPictureGUI
{
idc = 12101;
text = "gui\status_combat_inside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.60 * safezoneH + safezoneY;
w = 0.027 * safezoneW;
h = 0.037 * safezoneH;
colorText[] = {1,1,1,1};
};
class RscPicture_12102: RscPictureGUI
{
idc = 12102;
text = "gui\status_combat_border_CA.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.60 * safezoneH + safezoneY;
w = 0.027 * safezoneW;
h = 0.037 * safezoneH;
colorText[] = {1,1,1,1};
};



Позиция y = у меня уже изменена под мои хотелки, так что сами определите куда Вам её надо воткнуть.



Теперь правим файлик player_updateGui.sqf


private ["_array","_bloodText","_tempImg","_uiNumber","_blood","_foodLvl","_thirstLvl","_audible","_visual","_combatVal","_ctrlCombat"];

Это этап инициализации переменных, по сути я добавил две переменные - "_combatVal" и "_ctrlCombat"



Ищем код:


_ctrlBloodOuter = _display displayCtrl 1200;
_ctrlFoodBorder = _display displayCtrl 1201;
_ctrlThirstBorder = _display displayCtrl 1202;
_ctrlTempBorder = _display displayCtrl 1208;

И после него вставляем:


_ctrlCombat = _display displayCtrl 12101;





Ищем код:


_ctrlBloodOuter ctrlSetTextColor [1,1,1,1];
_ctrlFoodBorder ctrlSetTextColor [1,1,1,1];
_ctrlThirstBorder ctrlSetTextColor [1,1,1,1];
_ctrlTempBorder ctrlSetTextColor [1,1,1,1];

И после него вставляем:


_ctrlCombat ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_combatVal))),(Dayz_GUI_G * _combatVal),(Dayz_GUI_B * _combatVal), 0.5];

Ищем код:


// Flashing
if (_bloodVal < 0.2) then { _ctrlBlood call player_guiControlFlash; };
if (_thirstVal < 0.2) then { _ctrlThirst call player_guiControlFlash; };
if (_foodVal < 0.2) then { _ctrlFood call player_guiControlFlash; };
if (_tempVal > 0.8) then { _ctrlTemp call player_guiControlFlash; } else { _ctrlTemp ctrlShow true; };
if (r_player_injured) then { _ctrlBleed call player_guiControlFlash; };

И после него вставляем:


if (_combatVal == 0) then { _ctrlCombat call player_guiControlFlash;};



Не забудьте сохранить Ваши изменений! ;)



Все, теперь у нас есть моргающий комбат-таймер.

 

Делаю все так как описано выше, но по прежнему не работает. Индикатор есть, но не мигает.
И показывает только белым цветом. Сравнивал с оригиналом, вроде похожи.

Edited by Stiazz (see edit history)

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.