Jump to content
DeleoOne

How would i create a HUD for custom helmets?

Recommended Posts

As the title stated above, I've been having a hard time trying to create or find a way to make an addon for creating a custom HUD's for custom helmets.I want to add a health bar, Motion detector(like from halo), ammo bar and compass to this HUD. Any methods, suggestions or tutorials? Any and all help will be appreciated. I'll credit those who give any help in my addon!

  • Like 2

Share this post


Link to post
Share on other sites

Hello there DeleoOne and welcome also to Bis Forums !

 

There is something like that in the Operation Trebuchet , if you want to check :

 

 

  • Like 1

Share this post


Link to post
Share on other sites

This is very nice !

 

Since you have done all this work ,

i will add here a script , that it's not yet published and it might help you !

I have add a layer to be displayed in the screen , when you are wearing a certain racing helmet :

 

GF_Visor.sqf

Spoiler






//________________  Author : GEORGE FLOROS [GR] ___________ 28.12.18 _____________

/*
________________ GF_Visor Script ________________

//	Not yet published

Please keep the Credits or add them to your Diary

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open this with the simple notepad.
For everything that is with comment  //  in front  or between /* 
means that it is disabled , so there is no need to delete the extra lines. 

You can open this ex:
with notepad++
https://notepad-plus-plus.org/

and also use the extra pluggins
(this way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Scripts , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/
*/


systemchat "GF Visor Script";

	waitUntil {!isNull(findDisplay 46)};
	disableSerialization;

	[]	spawn {
		while {true} do {


_Force_1st_person_View		= true;

		
//________________	Check if there is helmet inside the inventory	________________

_Check_Headgear = headgear player; 


_Headgear_RacingHelmet_List = [
	"H_RacingHelmet_1_F",
	"H_RacingHelmet_2_F",
	"H_RacingHelmet_3_F",	
	"H_RacingHelmet_4_F",
	"H_RacingHelmet_1_black_F",
	"H_RacingHelmet_1_blue_F",
	"H_RacingHelmet_1_green_F",
	"H_RacingHelmet_1_red_F",
	"H_RacingHelmet_1_white_F",
	"H_RacingHelmet_1_yellow_F",
	"H_RacingHelmet_1_orange_F"
	]; 

if (
	(headgear player in _Headgear_RacingHelmet_List) 
	//(_Headgear_RacingHelmet_List in _Check_Headgear) 

	) then {

	systemchat"RacingHelmet with Visor";	
	
	
if (_Force_1st_person_View) then {	
	if (cameraOn == player && cameraView == "External") then
	{
	player switchCamera "Internal";
	};
};	
	
	//________________	Enable this to affect only the internal camera	________________
	if (cameraView != "EXTERNAL") then {
	systemchat"Internal view";	
	
	"GF_Visor" cutRsc ["Rsc_GF_Visor", "PLAIN"];
	//onEachFrame {"GF_Visor" cutRsc ["Rsc_GF_Visor", "PLAIN"]};
	
	} else{
	systemchat"External view";	
	
	"GF_Visor" cutText ["", "PLAIN"];
	//onEachFrame {0 cutText ["","PLAIN"]};
	};
	
} else {
	systemchat"NO Helmet or Visor";	
	
	//vehicle player
	
	"GF_Visor" cutText ["", "PLAIN"];
	//onEachFrame {"GF_Visor" cutText ["", "PLAIN"];};
};

sleep 0.5;
};
};

 

 

 

GF_Visor_HPP.hpp

Spoiler




//________________  Author : GEORGE FLOROS [GR] ___________ 28.12.18 _____________

/*
________________ GF_Visor Script ________________

//	Not yet published

Please keep the Credits or add them to your Diary

https://community.bistudio.com/wiki/SQF_syntax
Don't try to open this with the simple notepad.
For everything that is with comment  //  in front  or between /* 
means that it is disabled , so there is no need to delete the extra lines. 

You can open this ex:
with notepad++
https://notepad-plus-plus.org/

and also use the extra pluggins
(this way will be better , it will give also some certain colors to be able to detect ex. problems )
http://www.armaholic.com/page.php?id=8680

or use any other program for editing .

For the Compilation List of my GF Scripts , you can search in:
https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/
*/


/*
COPY this in the desrcription.ext :

//__________________________ ***  C O P Y   T H I S  *** __________________________
class RscTitles
{
	#include "GF_Visor\GF_Visor_HPP.hpp"		
};
//__________________________ ***  C O P Y   E N D  *** __________________________

*/


//	https://community.bistudio.com/wiki/Dialog_Control


// Control types
#define CT_STATIC 0

// Static styles

#define ST_LEFT           0x00

#define ST_LEFT		0
#define ST_RIGHT	1
#define ST_CENTER	2
#define ST_UP		3
#define ST_DOWN		4
#define ST_VCENTER	5

#define ST_SINGLE	0
#define ST_MULTI	16
#define ST_PICTURE	48
#define ST_FRAME	64

#define ST_HUD_BACKGROUND 128
#define ST_TILE_PICTURE 144
#define ST_WITH_RECT 160
#define ST_LINE	176

#define ST_SHADOW	256
#define ST_NO_RECT	512

#define FontM "Bitstream"
#define ST_LEFT      0
#define ST_RIGHT     1
#define ST_CENTER    2
#define CT_STATIC    0


//	https://community.bistudio.com/wiki/Dialog_Control

class Rsc_GF_Visor { 
idd = -1; 
duration = 1;
fadein = 0;
fadeout = 0;
	class controls { 
		class Rsc_GF_Visor_Control { 
			idc = 1200;
			type = CT_STATIC; 
			style = ST_PICTURE;
			tileH = 1;
			tileW = 1;

			//	Axis
			x = 0 * safezoneW + safezoneX;
			y = 0 * safezoneH + safezoneY;
			
			//	Size
			w = 1 * safezoneW;		
			h = 1 * safezoneH;	

			font = "EtelkaNarrowMediumPro"; 
			sizeEx = 1; 
			colorBackground[] = {0,0,0,0}; 
			colorText[] = {1,1,1,1};
			
			//	Image
			text = "GF_Visor\images\GF_Visor_2.paa"; 
			lineSpacing = 0; 
		}; 
	}; 
};

 

 

 

description.ext

Spoiler

//__________________________ ***  C O P Y   T H I S  *** __________________________


class RscTitles
{
	#include "GF_Visor\GF_Visor_HPP.hpp"	
};

 

 

and create a .paa image 2048 x 1024

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you very much DeleoOne !

 

I think that you should do as you like !

Good work !   :f:

  • Like 1

Share this post


Link to post
Share on other sites

I changed this script a bit and it's better right now , i will add here a post when it's ready.

  • Thanks 1

Share this post


Link to post
Share on other sites
3 hours ago, DeleoOne said:

Really, thanks!

 

I 'm close to end with this script ,

but there was an issue with another script that i have , so i will update once that and then i will end with this one.

Once it's done , i will publish this and you can work and use this however you like.

I always like everyone to be able to use , edit and adapt as they want.

 

Just , since you are using it , add me in the credits !

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Absolutely fine, I'm in no rush and I certainly will! :D

  • Like 1

Share this post


Link to post
Share on other sites

This is the first step , so now i will try for a HUD Script.

 

 

Just started :

a compass and an enemy indicator

vW1FZWl.png

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

THAT IS WHAT I'M TALKING ABOUT! Freaking genius. Im excited to see what happens when its ready! Thanks!

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, DeleoOne said:

Im excited to see what happens when its ready!

 

Thank you very much DeleoOne , i 'll try to make this good !

  • Thanks 1

Share this post


Link to post
Share on other sites

More progress :

 

compass ,

enemy indicator,

weapon name , picture , state , zeroing

altimeter,

kills,

grid,

HP,

firstaidkit,

magazines,

fps

RT1bNDV.pngC8LCu0W.pngXXmF5AL.png

  • Thanks 1

Share this post


Link to post
Share on other sites

Ok, this is epic. im loving how well this entire this is coming out. Its freaking amazing!

  • Like 1

Share this post


Link to post
Share on other sites

Thank you very much DeleoOne !

 

More progress and so far added :

 

rank,

fps,

altimeter,

firstaidkit,

HP,

grid,

kills - score,

magazines with the magazine picture,

weapon -  zeroing , state , picture , time , name

compass ,

enemy indicator,

target ( cursorTarget ) name  and picture

 

#Generally i will add a lot of stuff and then i will also incude options to enable them.

 

GwB8qYM.pngG6bptaM.pngTdIOCXR.png

q0wA4iJ.pngTg3J6Yg.png

 

Thanks !

  • Thanks 1

Share this post


Link to post
Share on other sites

?latest?cb=20120810160535&path-prefix=de

That was my next question and this! This is crazy amazing. Exactly what ive been looking for! Would there be anyway that i myself would be able to change the font and or location of specific HUD locations i.e. like moving the compass to the top screen, and make a mini map of enemies and friendlies like this? Keep that talent going GEORGE FLOROS, Thank you again!

  • Like 1

Share this post


Link to post
Share on other sites

Everything will be configurable , from the main options inside the script , position on screen , fonts etc.

 

It would be even better though,  to have the ability to adjust this with dialog settings in game.

-  I haven't edit any dialogs before , so i can't do that for now , but you could check if you want to experiment with, in order to include this as well.

Just an idea !

  • Thanks 1

Share this post


Link to post
Share on other sites

I 'm sending you the basic stuff to work with your project.

I wont be here for a couple of days !

 

Good Work !

 

celkzSx.png

td2BmhV.png

  • Thanks 1

Share this post


Link to post
Share on other sites

Sounds a lot of stuff DeleoOne  !

 

Yes you should be done with the armor values and once it's fine , then carry on with different stuff !  :f:

 

Just to know for everything that i can help i'm here !

 

For the HUD script that i gave you once it's done i will add a post here as well !

If in any case you manage to finish the HUD script , just let me now , in order to fix my version as well !

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×