Jump to content

Recommended Posts

Hello guys:
I am preparing a mission in the desert. The idea is that when the first objective is reached, the gps signal is lost and you have to move to the next objectives using the compass and the map tool.

I don't know if with "showGPS false;" on a trigger, it is possible to get what I want. Can somebody help me? Thanks.

Share this post


Link to post
Share on other sites

removing the GPS item should work

instructions here: 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Hello,

That is not the idea. The point is that the mission begins with the GPS working properly. At one point in the mission, the GPS stops receiving a signal and you have to use the compass, until at another point the GPS receives data again and works again. That's the idea.

Share this post


Link to post
Share on other sites

You could do it by overriding keypresses, but just simply removing the gps then adding it back again later would be the easiest way to do this. 

  • Thanks 1

Share this post


Link to post
Share on other sites

This is the idea: the mission starts with the GPS operational, at a specific moment the signal is temporarily lost. After a few minutes it returns to functional. I don't know if it can be, but that's the idea. Thanks guys for your help.

Share this post


Link to post
Share on other sites

I 'm trying to do this lately.I find a function named BIS_fnc_customGPSVideo but the example will not work properly even I replaced the video path.Hope this will help (although didn't work for me).

Share this post


Link to post
Share on other sites
13 hours ago, Firewall233 said:

I 'm trying to do this lately.

 

This seems to do the trick, GPS panels still work on vehicles with GPS (e.g. Marshall) and mine detectors also still keep working:

player enableInfoPanelComponent ["left", "MinimapDisplay", false];
player enableInfoPanelComponent ["right", "MinimapDisplay", false];

Edit:

13 hours ago, Firewall233 said:

I find a function named BIS_fnc_customGPSVideo but the example will not work properly even I replaced the video path.

 

That seems like a different issue.

Share this post


Link to post
Share on other sites
5 hours ago, RCA3 said:

 

This seems to do the trick, GPS panels still work on vehicles with GPS (e.g. Marshall) and mine detectors also still keep working:


player enableInfoPanelComponent ["left", "MinimapDisplay", false];
player enableInfoPanelComponent ["right", "MinimapDisplay", false];

Edit:

 

That seems like a different issue.

I looked up this "enableInfoPanelComponent" command.Seems that it will prevent left or right panel to show up.But it's not exactly what I'm trying to do.My idea is that, your GPS will show up with correct information like you position and direciton at beginning. And suddenly it will display some incorrect info,such as wrong position and time,maybe with wrong minimap displaying.And sometimes later or when some conditions met  your GPS will back to normal and show up correct information.You will always find out you do have a GPS item but it just don't work properly.

After look up "GPS" as keyword in forum,I think maybe the only way to realize my idea is to configure some GUI to override GPS display.But I can't figure out how to do it.T_T

Thanks for your suggestion anyway.^_^

  • Like 1

Share this post


Link to post
Share on other sites

Discussion and solution to drawing on the GPS panel here: 

 

Now, how to use this information to achieve what you are asking...

 

Maybe draw an opaque black rectangle over the visible area (or the whole control) then some icon on top of that, like an exclamation mark? I don't know if it's possible to cover the control with an image this way, which would be ideal, because it could say whatever you want ("Unable to connect", etc.)

 

Working with controls are well outside my wheelhouse, though.

  • Like 1

Share this post


Link to post
Share on other sites
13 hours ago, Harzach said:

Discussion and solution to drawing on the GPS panel here: 

 

Now, how to use this information to achieve what you are asking...

 

Maybe draw an opaque black rectangle over the visible area (or the whole control) then some icon on top of that, like an exclamation mark? I don't know if it's possible to cover the control with an image this way, which would be ideal, because it could say whatever you want ("Unable to connect", etc.)

 

Working with controls are well outside my wheelhouse, though.

I've noticed this topic.Actually I can't completely understand what they are talking about.But your advice is very helpful.At least I can try to make a small rectangle on the screen.

Thanks!!!

Share this post


Link to post
Share on other sites

Woke up wanting to play around with this a bit:

HARZ_disable_gps = [] spawn {
    waitUntil {!isNull (uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull])};
  
    disableSerialization; 
  
    private _display = uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull];
    private _miniMapControlGroup = _display displayCtrl 13301;
    private _miniMap = _miniMapControlGroup controlsGroupCtrl 101;
  
    HARZ_warn = _miniMap ctrlAddEventHandler ["Draw", {
        (_this select 0) drawIcon [
        "\A3\ui_f\data\map\Markers\Military\warning_ca.paa",
        [1,0,0,1],
        getPos player,
        50,
        50,
        0
        ]
    }];
    HARZ_cover = _miniMap ctrlAddEventHandler ["Draw", {
        (_this select 0) drawRectangle [
        getPos player,
        1000,
        1000,
        0,
        [0,0,0,1],
        "#(rgb,8,8,3)color(0,0,0,1)"
        ]
    }];
};

hMMus8S8.png

 

 

To re-enable GPS:

if ((!isNil "HARZ_disable_gps")) then
{
    private _display = uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull];
    private _miniMapControlGroup = _display displayCtrl 13301;
    private _miniMap = _miniMapControlGroup controlsGroupCtrl 101;
    _miniMap ctrlRemoveEventHandler ["Draw", HARZ_cover];
    _miniMap ctrlRemoveEventHandler ["Draw", HARZ_warn];
};

It seems to work, but I did minimal testing in SP, and all code is just copy/paste/replace/mash-up of code by users in the topic linked above, as well as others, so who knows what I'm getting wrong. Any and all corrections/clean-ups are welcomed!

  • Like 3

Share this post


Link to post
Share on other sites
On 1/25/2022 at 6:13 PM, Harzach said:

Woke up wanting to play around with this a bit:


HARZ_disable_gps = [] spawn {
    waitUntil {!isNull (uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull])};
  
    disableSerialization; 
  
    private _display = uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull];
    private _miniMapControlGroup = _display displayCtrl 13301;
    private _miniMap = _miniMapControlGroup controlsGroupCtrl 101;
  
    HARZ_warn = _miniMap ctrlAddEventHandler ["Draw", {
        (_this select 0) drawIcon [
        "\A3\ui_f\data\map\Markers\Military\warning_ca.paa",
        [1,0,0,1],
        getPos player,
        50,
        50,
        0
        ]
    }];
    HARZ_cover = _miniMap ctrlAddEventHandler ["Draw", {
        (_this select 0) drawRectangle [
        getPos player,
        1000,
        1000,
        0,
        [0,0,0,1],
        "#(rgb,8,8,3)color(0,0,0,1)"
        ]
    }];
};

hMMus8S8.png

 

 

To re-enable GPS:


if ((!isNil "HARZ_disable_gps")) then
{
    private _display = uiNamespace getVariable ["RscCustomInfoMiniMap", displayNull];
    private _miniMapControlGroup = _display displayCtrl 13301;
    private _miniMap = _miniMapControlGroup controlsGroupCtrl 101;
    _miniMap ctrlRemoveEventHandler ["Draw", HARZ_cover];
    _miniMap ctrlRemoveEventHandler ["Draw", HARZ_warn];
};

It seems to work, but I did minimal testing in SP, and all code is just copy/paste/replace/mash-up of code by users in the topic linked above, as well as others, so who knows what I'm getting wrong. Any and all corrections/clean-ups are welcomed!

Thank you Harzach! Your code works fine as it cover the minimap.GUI is a difficult part for me.I will spend some time on learning these codes.Try to cover the position and direction message as well.

Share this post


Link to post
Share on other sites
On 1/24/2022 at 2:10 AM, RCA3 said:

 

This seems to do the trick, GPS panels still work on vehicles with GPS (e.g. Marshall) and mine detectors also still keep working:


player enableInfoPanelComponent ["left", "MinimapDisplay", false];
player enableInfoPanelComponent ["right", "MinimapDisplay", false];

Edit:

 

That seems like a different issue.

Where exactly do i put this code in a trigger, init.sqf, description.ext or init field of an player?

player enableInfoPanelComponent ["left", "MinimapDisplay", false];
player enableInfoPanelComponent ["right", "MinimapDisplay", false];

 

Share this post


Link to post
Share on other sites
40 minutes ago, Kaarlo-7173a00cd297f8d9 said:

Where exactly do i put this code

 

Since it references "player", it should be run wherever the intended player is local. In SP, that's basically anywhere. In MP, initPlayerLocal.sqf might be the best option.

  • 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

×