Jump to content

Recommended Posts

Sounds good, Thank you Iceman77 :)

Thanks to tonic for clarifying some things. Unfortunately the most I can do here is fall in line with the 'standard' way of doing things. Meaning, I'll define rscTitles is the description.ext and let users add their own #includes. However I've no control over how or where other (users) UI scripts define rscTitles. You would need to dig into the GVS files for example and see where the author has defined rscTitles. Delete the rscTitles and input all of the code that resided within the rscTitles brackets into a new .hpp file. You would then insert your own #include "myNewFile.hpp" into the rscTitles defined within the description.ext. Also, based on when / the order the GVS files need to be defined, you would need to sort that aswell.

If everyone follows this 'standard' of defining rscTitles, the map makers simply need to copy and paste the new include into the .ext within rscTitles. Something like this:

class RscTitles 
{
 #include "UI\defines.hpp"
 #include "gvs\myNewFile.hpp"  
};

I'm sure it's all very confusing, but this is the best I can offer I'm affraid :( . There are some options though if your confidence is waning. 1. Scrap status_hud 2. scrap gvs (or any other conflicting ui). 3. Use status_hud addon version. In any case, I put the new download up for you. Good luck.

It's going to conflict regardless if other people don't follow the same design patterns but what you have put above is a better way. Those that run into problems will just have to learn how to separate RscTitles from their file and call from Description.ext where RscTitles is defined. When it comes to public releases always keep your resource from conflicting with others as much as possible. Which is why I do CfgFunctions from the description.ext with VAS and VVS.

Edited by Iceman77

Share this post


Link to post
Share on other sites

I removed GVS, since the Repair/ Refuel/ Ammo vehicles in the game actually take care of that in the game. Totally forgot that they could do that until I smashed into it accidently and then it repaired my vehicle and filled it with ammo. :)

Share this post


Link to post
Share on other sites

You could also use the addon version without any conflict. :cool: Anyhow, glad you "sorted" it.

Share this post


Link to post
Share on other sites
Since you have it saying NW already could you create it with a digital readout of the compass heading?

De-pbo the status_hud.pbo (I use pbo view). Go into the UI folder. Replace the hud.sqf file with this new one. Re-pbo the folder and place the new status_hud.pbo back into the @status_hud\addons folder. Maybe sometime I will make this an option, in some outter cfg file or something. Along with toggling the different UI elements. ie; health, fps etc etc.

---------- Post added at 12:46 ---------- Previous post was at 12:41 ----------

Better yet, just download this new .pbo and replace the old one with it.

Share this post


Link to post
Share on other sites

Updated to v1.5:

- Optimized code to use switch do control structure

- Icons now keep their aspect ratio

Share this post


Link to post
Share on other sites
Guest

New version frontpaged on the Armaholic homepage.

==============================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites
I'd love to see something like this, with an indicator for your soldiers' Stamina included. Apart from that, nice work, clean code, and i like the simply symbols.

This was a great idea.

What about a small one for stances ?

Just a Question on this code ive used with the A2 version wich wont work in A3.

It used to be an on/off switch with the h key but it only blinks for a sec and nothing happens.

Maybe someone has an idea ?

[] call compile preProcessFile "UI\HUD.sqf";
sleep 0.005;
(findDisplay 46) displayAddEventHandler 

[
  "KeyDown", 
  "pr = player getvariable ['press',true];
   keyp=(_this select 1);
   if (keyp==35 and pr) then 
      {
        cutRsc ['default','PLAIN'];
        player setvariable ['press',False];
      } 
       else 
           {
             if (keyp==35) then 
                {
                  [] spawn ICE_HUD;
                  player setvariable ['press',True];
                };

           }

"]; 

Anyway very cool work same as in A2. Playing with it for a very long time now.:D

Share this post


Link to post
Share on other sites

======================

REQUIRED ADDONS:

======================

Addon version only - @CBA

i just got one question ...

why are you using CBA?

Share this post


Link to post
Share on other sites
i just got one question ...

why are you using CBA?

So I could use Extended_PostInit_EventHandlers I noticed in many other configs, to run a script from the config. I knew no other way, as i made this on a whim. It's my first addon and probably will be my last.

---------- Post added at 21:06 ---------- Previous post was at 21:04 ----------

What about a small one for stances ?

Not a bad idea, I may do this. Isn't there already a default stance indicator though?

Share this post


Link to post
Share on other sites

I reckon to show the bearing and direction for the HUD, have a compass + number bearing combo. What do you reckon?

Share this post


Link to post
Share on other sites

Yes that's certainly possible. If I update this I'll include both. Or ofcourse feel free to do it yourself.

Share this post


Link to post
Share on other sites
So I could use Extended_PostInit_EventHandlers I noticed in many other configs, to run a script from the config. I knew no other way, as i made this on a whim. It's my first addon and probably will be my last.

---------- Post added at 21:06 ---------- Previous post was at 21:04 ----------

Not a bad idea, I may do this. Isn't there already a default stance indicator though?

check out this wiki article

http://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Adding_a_Function

then you can remove the requirement CBA from your addon

if you got problems on using theese

just write a pn to me

Share this post


Link to post
Share on other sites

Cool. If I ever update this I'll remove the requirement.

Share this post


Link to post
Share on other sites
Cool. If I ever update this I'll remove the requirement.
Hi and thanks for making this little nice addon. As mentioned, you don't have to depend on CBA for this.

Here's how you do it:

1 - remove the dependency on CBA.

class CfgPatches
{
class status_hud
{
	units[] = {};
	weapons[] = {};
	requiredAddons[] = {};
	requiredVersion = 0.1;
};
};

2 - replace Extended_PostInit_EventHandlers with something like this:

class CfgFunctions
{
class Iceman77
{
	class HUD
	{
		class StatusHUD
		{
			file = "\status_hud\ui\hud.sqf";
			postInit = 1;
		};
	};
};
};

3 - edit UI\HUD.sqf so it can be called as a function. Bonus feature: fix the problem where the HUD stops working when resuming a saved game:

Replace this

sleep 0.005;
[] spawn ICE_HUD;

with

[] spawn {
   waitUntil {!isNil "BIS_fnc_init"};
   while {true} do
   {
       _h = [] spawn ICE_HUD;
       waitUntil {sleep 1; scriptDone _h}; // Wait for save-then-resume
   };
};
true

Share this post


Link to post
Share on other sites

Hello Iceman77,

With your scripted version, I'm having a very hard time trying to change the size of those icons (they're a bit too small)

So I was wondering if you could show me how to do this.

Thanks,

Ranwer

Share this post


Link to post
Share on other sites

Open the defines.hpp and change the width and height ( w h ) of the pictures.

Share this post


Link to post
Share on other sites

Take a look at post #32. Another goodfella requested the same thing.

Share this post


Link to post
Share on other sites
when I reload a mission or switch to another player the status are gone. can I fix this by my own somehow?

Same thing happens to me, and I haven't found a workaround. I think it's because this mod uses CBA and saves some info that doesn't get reloaded with the mission. Too bad cause I really like this mod, but it's useless with saved games.

Share this post


Link to post
Share on other sites
Same thing happens to me, and I haven't found a workaround. I think it's because this mod uses CBA and saves some info that doesn't get reloaded with the mission. Too bad cause I really like this mod, but it's useless with saved games.
No. It is not caused by CBA. It is due to the the status HUD addon running a script that has dialog-related variables. When a game is saved, any and all spawned scripts that have variables referencing GUI items will stop. The fix for this problem can be seen in step 3 in post #43 above. One has to detect a save-then-reload and then re-launch the "ICE_HUD" thread.

More background reading: loadable permanent GUI?

More formally expressed by Str in disableSerialization: "Scope with disabled serialization is discontinued after load, even if there's endless loop inside."

Edited by Killswitch

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

×