Jump to content

Recommended Posts

I would like to disable the vehicle panels showing GPS, radar, and crew. I have tried using the showHUD command and its parameters, but it does not work for vehicles.

Share this post


Link to post
Share on other sites

Try using this command "enableInfoPanelComponent"

 

These are not documented in the wiki yet so you'll have to press F1 while in the debug console to see how they work

Share this post


Link to post
Share on other sites

object enableInfoPanelComponent [panel name (str), component (str), enable (bool)];

or

[object,turretPath] enableInfoPanelComponent [panel name (str), component (str), enable (bool)];

But unfortunately I don't see a way to get the names of the available components.

[infopanel "left",infopanel "right"] returns (sitting in a Hunter): [["EmptyDisplay","EmptyDisplayComponent"],["EmptyDisplay","EmptyDisplayComponent"]] and

{(vehicle player) enableInfoPanelComponent ["left",_x,false]} forEach (infopanel "left");{(vehicle player) enableInfoPanelComponent ["right",_x,false]} forEach (infopanel "right");

doesn't do anything.

Me stupid. I found the following displays in vehicles thus far:

["MineDetectorDisplayComponent","MinimapDisplayComponent","CrewDisplayComponent","TransportFeedDisplayComponent","SensorsDisplayComponent","SlingLoadDisplayComponent"]

So

{(vehicle player) enableInfoPanelComponent ["left",_x,false]} forEach ["MineDetectorDisplayComponent","MinimapDisplayComponent","CrewDisplayComponent","TransportFeedDisplayComponent","SensorsDisplayComponent","SlingLoadDisplayComponent"];

should do the trick for now.

I whipped this up quick and dirty: https://github.com/Pergor/ADV_MissionTemplate/blob/master/adv_missiontemplate.altis/functions/server/internal/fn_enableInfoComponent.sqf

 

Terrible oversight to have most of these panels available all the time. You can even conjur up the "MineDetectorDisplayComponent" while on foot - without having a mine detector. Every vehicle, be it civilian, a modded 100 year old Ford, a WW2 era tank or whathaveyou - they all have suddenly got a GPS and a mine detector and probably a gunner and commander cam.

  • Like 2

Share this post


Link to post
Share on other sites
14 hours ago, belbo said:

{(vehicle player) enableInfoPanelComponent ["left",_x,false]} forEach ["MineDetectorDisplayComponent","MinimapDisplayComponent","CrewDisplayComponent","TransportFeedDisplayComponent","SensorsDisplayComponent","SlingLoadDisplayComponent"];

This works perfectly. 

 

I am still new to scripting and advanced things like this, so I didn't understand the code you linked @belbo. Would you mind explaining to me how it is different than the lines I l quoted? In addition, where would be the best place to store this code?

Share this post


Link to post
Share on other sites

The code I wrote is a function that you can implement into a mission that offers a bit of flexibility so you can simply call it on any vehicle without having to write as much code.

Create a fn_enableInfoPanel.sqf in your mission folder, copy my code over to that file, then you can remove the displays for any vehicle in the editor like this:

[this,false] call compile preprocessFileLineNumbers "fn_enableInfoPanel.sqf";

or alternatively in your init.sqf with the corresponding vehicle names:

adv_fnc_enableInfoPanel = compile preprocessFileLineNumbers "fn_enableInfoPanel.sqf";

[veh_1,false] call adv_fnc_enableInfoPanel;
[veh_2,false] call adv_fnc_enableInfoPanel;
...
[veh_n,false] call adv_fnc_enableInfoPanel;

 

Share this post


Link to post
Share on other sites

Does this work work UAVs as well? I cannot seem to get this to work with the latest drone form the Contact DLC. 

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

×