Jump to content
Sign in to follow this  
iceman77

Light weight status HUD

Recommended Posts

statushud.jpg

Download

Here's a light weight status HUD I made for the lower right corner of the screen.

FIX #1: Direction indicator works with vehicles now too.

FIX #2: Camera Zoom now works with vehicles. Included installation readme. Took out un-needed bits of code and cleaned up the scripts in general. For people who may want to learn from this.

FIX #3: Users now have the ability to toggle the status HUD on/off with Page Down. (f2k-Sel)

Edited by Iceman77

Share this post


Link to post
Share on other sites

Thanks for sharing Iceman77.

I like the health feature and the direction control.

What would be awesome is to have showing type of weapon and ammostatus instead of the map.

but great work in any case..

Share this post


Link to post
Share on other sites

Hey. Yeah, I was going to add those features too. I still may. This HUD is a small part of a game mode I'm working on. So, in another UI, weapon and ammo status is already shown, so that stuff wasn't needed. You're the author of the A2 crcti? Maybe i can make you a custom hud then?

Share this post


Link to post
Share on other sites

It's great I like the simple ones as you can take them apart and see how it works.

The only thing I'd change would be to replace the Zoom triggers with a single keypress to cycle through each resolution, or key press and mouse scroll.

Share this post


Link to post
Share on other sites

hmm. How to do this? I know rsctitles / displays can't be interacted with.. for the most part. Unless I could do a shortcut for the zoom somehow?

Share this post


Link to post
Share on other sites
...You're the author of the A2 crcti? Maybe i can make you a custom hud then?

I would appreciate this.

Share this post


Link to post
Share on other sites

Look forward for it to be up on Six.

Share this post


Link to post
Share on other sites

thank you so much for this! i was struggling to find a satisfying way to make my own HUD and this is exactly what i needed.

an example without unneeded clutter that i can modify and learn from. thank you! thank you! thank you!

Share this post


Link to post
Share on other sites

Yeah definitely easier to learn without to much going on in the ui / scripts. I made it pretty straight forward, which is nice. I will update it as soon as I find a way to toggle the status HUD on/off. If you find a way first let me know :). I may have to look into rubber kites wf to see how to toggle the hud controls/class. Anyhow, it's a bit of a learning process for me atm aswell.

Share this post


Link to post
Share on other sites

Just remove the []Spawn ICE_HUD; the end of HUD.sqf and when you want to run it just use []Spawn ICE_HUD; in script or null=[]Spawn ICE_HUD; in a trigger.

To turn it off cutRsc ["default", "PLAIN"];

Works for me anyway

Share this post


Link to post
Share on other sites

Hey thanks! Gonna try this asap.

---------- Post added at 16:36 ---------- Previous post was at 16:26 ----------

ahh yes, default works nicely here!

Share this post


Link to post
Share on other sites

If you add this to the init.sqf file you can open and close the Hud by pressing pagedown key.

(findDisplay 46) displayAddEventHandler ["KeyDown", "pr = player getvariable ['press',true];keyp=(_this select 1);if (keyp==209 and pr) then {[] spawn ICE_HUD;player setvariable ['press',false];} else {if (keyp==209) then {cutRsc ['default','PLAIN'];player setvariable ['press',true]}}"];

Share this post


Link to post
Share on other sites

:dancehead:

---------- Post added at 18:28 ---------- Previous post was at 17:55 ----------

FIX #3: Users now have the ability to toggle the status HUD on/off with Page Down. Thanks to F2k-Sel.

Share this post


Link to post
Share on other sites

Hey, I'm trying to get this to work with my insurgency mission, but when I try to use it it says that RscTitles are already defined, so I moved the content of that to common/resources/titles.hpp, it fixes the RscTitles problem, but after that an error pops up saying that IceBaseBOXHUD isn't defined. I move the #include "common/resources/titles.hpp" above HUD.hpp, but that didn't work.

Share this post


Link to post
Share on other sites

it should look better

 class IceBaseMapControlHUD
     { 
access = 0; 
idc = -1; 
type = CT_MAP_MAIN; 
style = ST_PICTURE; 
x = 0.05; y = 0.05; 
w = 0.90; h = 0.90;  
colorLevels[] = {0.65, 0.6, 0.45, 1};
colorSea[] = {0.46, 0.65, 0.74, 0.5};
colorForest[] = {0.45, 0.64, 0.33, 0.5};
colorRocks[] = {0, 0, 0, 0.3};
colorCountlines[] = {0.85, 0.8, 0.65, 1};
colorMainCountlines[] = {0.45, 0.4, 0.25, 1};
colorCountlinesWater[] = {0.25, 0.4, 0.5, 0.3};
colorMainCountlinesWater[] = {0.25, 0.4, 0.5, 0.9};
colorPowerLines[] = {0.1, 0.1, 0.1, 1};
colorRailWay[] = {0.8, 0.2, 0, 1};
colorOutside[] = { 1, 1, 1, 1};
colorForestBorder[] = {0, 0, 0, 0};
colorRocksBorder[] = {0, 0, 0, 0};
colorNames[] = {0.1, 0.1, 0.1, 0.9};
colorInactive[] = {1, 1, 1, 0.5};
colorText[] = {0, 0, 0, 1};
colorBackground[] = {0.8, 0.8, 0.8, 1};
alphaFadeStartScale = 2;
alphaFadeEndScale = 3;
font = "TahomaB"; 
       sizeEx = 0.030000; 
fontLabel = "TahomaB"; 
sizeExLabel = 0.034; 
fontGrid = "TahomaB"; 
sizeExGrid = 0.03; 
fontUnits = "TahomaB"; 
sizeExUnits = 0.034; 
fontNames = "TahomaB"; 
sizeExNames = 0.056; 
fontInfo = "TahomaB"; 
sizeExInfo = 0.034; 
fontLevel = "TahomaB"; 
sizeExLevel = 0.024; 
stickX[] = {0.20, {"Gamma", 1.00, 1.50} }; 
stickY[] = {0.20, {"Gamma", 1.00, 1.50} }; 
ptsPerSquareSea = 6; 
ptsPerSquareTxt = 8; 
ptsPerSquareCLn = 8; 
ptsPerSquareExp = 8; 	
ptsPerSquareCost = 8; 
ptsPerSquareFor = "4.0f"; 
ptsPerSquareForEdge = "10.0f"; 
ptsPerSquareRoad = 2; 
ptsPerSquareObj = 10; 
maxSatelliteAlpha = 0.8;
text = "\ca\ui\data\map_background2_co.paa";  
showCountourInterval=1; 
scaleDefault = 0.3; 
onMouseButtonClick = ""; 
onMouseButtonDblClick = ""; 

class Task {
	icon = "\ca\ui\data\ui_taskstate_current_CA.paa";
	iconCreated = "\ca\ui\data\ui_taskstate_new_CA.paa";
	iconCanceled = "#(argb,8,8,3)color(0,0,0,0)";
	iconDone = "\ca\ui\data\ui_taskstate_done_CA.paa";
	iconFailed = "\ca\ui\data\ui_taskstate_failed_CA.paa";
	color[] = {0.863, 0.584, 0.0, 1};
	colorCreated[] = {0.95, 0.95, 0.95, 1};
	colorCanceled[] = {0.606, 0.606, 0.606, 1};
	colorDone[] = {0.424, 0.651, 0.247, 1};
	colorFailed[] = {0.706, 0.0745, 0.0196, 1};
	size = 27;
	importance = 1;
	coefMin = 1;
	coefMax = 1;
};

class CustomMark {
	icon = "\ca\ui\data\map_waypoint_ca.paa";
	color[] = {0.6471, 0.6706, 0.6235, 1.0};
	size = 18;
	importance = 1;
	coefMin = 1;
	coefMax = 1;
};

class Legend {
	x = "SafeZoneX";
	y = "SafeZoneY";
	w = 0.34;
	h = 0.152;
	font = "Zeppelin32";
	sizeEx = 0.03921;
	colorBackground[] = {0.906, 0.901, 0.88, 0};
	color[] = {0, 0, 0, 1};
};

class Bunker {
	icon = "\ca\ui\data\map_bunker_ca.paa";
	size = 14;
	color[] = {0, 0, 1, 1};
	importance = 1.5 * 14 * 0.05;
	coefMin = 0.25;
	coefMax = 4;
};

class Bush {
	icon = "\ca\ui\data\map_bush_ca.paa";
	color[] = {0.55, 0.64, 0.43, 1};
	size = 14;
	importance = 0.2 * 14 * 0.05;
	coefMin = 0.25;
	coefMax = 4;
};

class BusStop {
	icon = "\ca\ui\data\map_busstop_ca.paa";
	color[] = {0, 0, 1, 1};
	size = 12;
	importance = 1 * 10 * 0.05;
	coefMin = 0.25;
	coefMax = 4;
};

class Command {
	icon = "\ca\ui\data\map_waypoint_ca.paa";
	color[] = {0, 0.9, 0, 1};
	size = 18;
	importance = 1;
	coefMin = 1;
	coefMax = 1;
};

class Cross {
	icon = "\ca\ui\data\map_cross_ca.paa";
	size = 16;
	color[] = {0, 0.9, 0, 1};
	importance = 0.7 * 16 * 0.05;
	coefMin = 0.25;
	coefMax = 4;
};

class Fortress {
	icon = "\ca\ui\data\map_bunker_ca.paa";
	size = 16;
	color[] = {0, 0.9, 0, 1};
	importance = 2 * 16 * 0.05;
	coefMin = 0.25;
	coefMax = 4;
};

class Fuelstation {
	icon = "\ca\ui\data\map_fuelstation_ca.paa";
	size = 16;
	color[] = {0, 0.9, 0, 1};
	importance = 2 * 16 * 0.05;
	coefMin = 0.75;
	coefMax = 4;
};

class Fountain {
	icon = "\ca\ui\data\map_fountain_ca.paa";
	color[] = {0.2, 0.45, 0.7, 1};
	size = 11;
	importance = 1 * 12 * 0.05;
	coefMin = 0.25;
	coefMax = 4;
};

class Hospital {
	icon = "\ca\ui\data\map_hospital_ca.paa";
	color[] = {0.78, 0, 0.05, 1};
	size = 16;
	importance = 2 * 16 * 0.05;
	coefMin = 0.5;
	coefMax = 4;
};

class Chapel {
	icon = "\ca\ui\data\map_chapel_ca.paa";
	color[] = {0, 0, 1, 1};
	size = 16;
	importance = 1 * 16 * 0.05;
	coefMin = 0.9;
	coefMax = 4;
};

class Church {
	icon = "\ca\ui\data\map_church_ca.paa";
	size = 16;
	color[] = {0, 0.9, 0, 1};
	importance = 2 * 16 * 0.05;
	coefMin = 0.9;
	coefMax = 4;
};

class Lighthouse {
	icon = "\ca\ui\data\map_lighthouse_ca.paa";
	size = 14;
	color[] = {0, 0.9, 0, 1};
	importance = 3 * 16 * 0.05;
	coefMin = 0.9;
	coefMax = 4;
};

class Quay {
	icon = "\ca\ui\data\map_quay_ca.paa";
	size = 16;
	color[] = {0, 0.9, 0, 1};
	importance = 2 * 16 * 0.05;
	coefMin = 0.5;
	coefMax = 4;
};

class Rock {
	icon = "\ca\ui\data\map_rock_ca.paa";
	color[] = {0.1, 0.1, 0.1, 0.8};
	size = 12;
	importance = 0.5 * 12 * 0.05;
	coefMin = 0.25;
	coefMax = 4;
};

class Ruin {
	icon = "\ca\ui\data\map_ruin_ca.paa";
	size = 16;
	color[] = {0, 0.9, 0, 1};
	importance = 1.2 * 16 * 0.05;
	coefMin = 1;
	coefMax = 4;
};

class SmallTree {
	icon = "\ca\ui\data\map_smalltree_ca.paa";
	color[] = {0.45, 0.64, 0.33, 0.4};
	size = 12;
	importance = 0.6 * 12 * 0.05;
	coefMin = 0.25;
	coefMax = 4;
};

class Stack {
	icon = "\ca\ui\data\map_stack_ca.paa";
	size = 20;
	color[] = {0, 0.9, 0, 1};
	importance = 2 * 16 * 0.05;
	coefMin = 0.9;
	coefMax = 4;
};

class Tree {
	icon = "\ca\ui\data\map_tree_ca.paa";
	color[] = {0.45, 0.64, 0.33, 0.4};
	size = 12;
	importance = 0.9 * 16 * 0.05;
	coefMin = 0.25;
	coefMax = 4;
};

class Tourism {
	icon = "\ca\ui\data\map_tourism_ca.paa";
	size = 16;
	color[] = {0.78, 0, 0.05, 1};
	importance = 1 * 16 * 0.05;
	coefMin = 0.7;
	coefMax = 4;
};

class Transmitter {
	icon = "\ca\ui\data\map_transmitter_ca.paa";
	color[] = {0, 0.9, 0, 1};
	size = 20;
	importance = 2 * 16 * 0.05;
	coefMin = 0.9;
	coefMax = 4;
};

class ViewTower {
	icon = "\ca\ui\data\map_viewtower_ca.paa";
	color[] = {0, 0.9, 0, 1};
	size = 16;
	importance = 2.5 * 16 * 0.05;
	coefMin = 0.5;
	coefMax = 4;
};

class Watertower {
	icon = "\ca\ui\data\map_watertower_ca.paa";
	color[] = {0.2, 0.45, 0.7, 1};
	size = 20;
	importance = 1.2 * 16 * 0.05;
	coefMin = 0.9;
	coefMax = 4;
};

class Waypoint {
	icon = "\ca\ui\data\map_waypoint_ca.paa";
	color[] = {0, 0, 1, 1};
	size = 14;
	importance = 2.5 * 16 * 0.05;
	coefMin = 0.5;
	coefMax = 4;
};

class WaypointCompleted {
	icon = "\ca\ui\data\map_waypoint_completed_ca.paa";
	color[] = {0, 0, 1, 1};
	size = 14;
	importance = 2.5 * 16 * 0.05;
	coefMin = 0.5;
	coefMax = 4;
};

class ActiveMarker {
	icon = "";
	color[] = {0, 0, 1, 1};
	size = 14;
	importance = 2.5 * 16 * 0.05;
	coefMin = 0.5;
	coefMax = 4;
};

EoH37J2o.png

Edited by Dimon

Share this post


Link to post
Share on other sites

Hi! I only cared about functionality at the time. I really appreciate the snippet though, thankyou very much.

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
Sign in to follow this  

×