Jump to content
VulturARG

Is it possible hide the gps when the player is aiming?

Recommended Posts

Hi guys,

 

I'm interested in any way to hide the GPS screen when the player is aiming, like the compass or watch.

 

Any idea?

 

Regards,

Share this post


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

Hi guys,

 

I'm interested in any way to hide the GPS screen when the player is aiming, like the compass or watch.

 

Any idea?

 

Regards,

Hey mate, the easiest way could be this:

 

Go to option>control>common>toggle GPS.

At the default Right Ctrl+M add right mouse key (assuming is your aiming/optic key). It will tell you that there's a keys conflict but ignore it.

In game, bring up the GPS with the default key (Right Ctrl+M) and toggle it with the right mouse key/aiming.

Tested and working. 

The only drawback is that the GPS will toggle on whenever you're not aiming. However, that's easily solved: put the GPS in the vest/uniform/backpack..done.

  • Like 2

Share this post


Link to post
Share on other sites

Thank for your answer.

 

But I'm looking for some solution that not depend of good will of player.

 

Regards

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, VulturARG said:

Thank for your answer.

 

But I'm looking for some solution that not depend of good will of player.

 

Regards

Gotcha!

 

So..you need to FORCE that on the player....mmmm....not an expert, but you should try looking into Event Handlers or User Interface Event Handlers. Maybe you'll find what you're looking for.

Cheers  Bud!

Share this post


Link to post
Share on other sites
if (visibleGPS and cameraView isEqualTo "GUNNER") then
{
 showGPS false;
};

but idk if showGPS is able to close the GPS screen. wiki entries state´s about closing the on-map-gps-receiver of Arma 2...

Share this post


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

if (visibleGPS and cameraView isEqualTo "GUNNER") then
{
 showGPS false;
};

but idk if showGPS is able to close the GPS screen. wiki entries state´s about closing the on-map-gps-receiver of Arma 2...

 

That doesn't work. I tested that, then tried to close the display (133?) without any success more...

Share this post


Link to post
Share on other sites
addMissionEventHandler ["EachFrame", {
	if (visibleGPS && {cameraView == "gunner"}) then {
		player unlinkItem "ItemGPS";
	} else {
		player linkItem "ItemGPS";
	};
}];

Hides the GPS when aiming, and the player needs to open it again when no longer aiming. :shrug:

  • Like 2

Share this post


Link to post
Share on other sites

Thanks for everyone's response.

 

I'm going to try this code.

 

Where does this code go? In the initServer?

Share this post


Link to post
Share on other sites
Posted (edited)

Not that familiar with MP stuff, but I'd reckon that would be the best place to put this.
 

EDIT:
Although, the removeItem etc stuff might require this to be a bit more complex than that simple code I posted when used in MP.. :sad:
Someone more MP oriented might have more valuable input on this..

Edited by h -
  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, VulturARG said:

Where does this code go? In the initServer?

initPlayerLocal.sqf should be the place cause every client machine has to run it and server does not need it

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

ok, to all. I hope that someone who has knowledge of MP comment about it.

Share this post


Link to post
Share on other sites
8 minutes ago, VulturARG said:

ok, to all. I hope that someone who has knowledge of MP comment about it.

 

code should be okay for MP as long as it is executed on each player client.

  • Thanks 1

Share this post


Link to post
Share on other sites
6 minutes ago, sarogahtyp said:

 

code should be okay for MP as long as it is executed on each player client.

 

Thanks!!!

  • Like 1

Share this post


Link to post
Share on other sites

You can improve it a little bit, adding a condition for player linkItems GPS  also, because else means: "in any other case" and then, you run this code every frame for nuts (except when first part of condition is true).

 

 

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, pierremgi said:

You can improve it a little bit, adding a condition for player linkItems GPS  also, because else means: "in any other case" and then, you run this code every frame for nuts (except when first part of condition is true).

 

 

I'm sorry but I can't follow you. I'm just start to learn about scripts

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

×