Forum Jump :

Author Message


Posts: 4
Rank:


Level: Member

Country: no
Location:
Occupation:
Age:
In-game name: Golemartin

 
#1 Posted at 2014-07-28 16:06        
     
Recently I have been making an ALIVE mission, in which all the players start from one base. And I recalled the BIS campaign doing all the "in-base" markers (armory, briefing etc.) in a way that made them fade out when the player zoomed out on their map, thus removing a lot of clutter.

I have been looking into how I can do this for a couple of days now, but no matter how much I look through all script commands and functions I can not find a way to do this. Looking at the campaign hub missions in the editor did not help either, since those missions use hundreds of functions, and finding the right one would take to long time.

I did find out about setMarkerAlpha, and this is obviously a piece of the puzzle. However the problem is now finding a way to actually get the current map zoom-level.

While searching for this I found this post on the BI-forums but it really does not solve any issues as I can not get the ctrlMapScale command to work and I can not find proper documentation for it.

Any help would be greatly appreciated!


Author Message


Posts: 250
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name: austinXmedic

 
#2 Posted at 2014-07-28 18:12        
     
Quote from the notes section of the command:

Giova:
16:53, 23 January 2007 (CET) : this command doesn't works under armed Assault v1.02, it always return: 1

_marker = _this select 0;
_markeralpha = 1.0;
while{_markeralpha > 0} then
{
     _markeralpha = _markeralpha - 0.001;
     _marker setMarkerAlpha _markeralpha;
     sleep 0.0001;
};

doesn't get you any closer to finding out a way to find the map scale, but it could be useful... sort of... could be used as an alternative I guess.

Some of my work:
http://steamcommunity.com/sharedfiles/filedetails/?id=287343671 -- Unit Play/ Unit Capture Functions Guide
http://steamcommunity.com/sharedfiles/filedetails/?id=265454265 -- Zeus Guide
add me on steam: austin_medic

Advertisement


Author Message


Posts: 4
Rank:


Level: Member

Country: no
Location:
Occupation:
Age:
In-game name: Golemartin

 
#3 Posted at 2014-07-28 23:54        
     
I made myself a work around using a triggers act. and deact. fields to apply setmarkeralpha to the markers making the clutter, and made one marker which would be visible when the others were invisible, and the other way around. '

The trigger is simply set up to activate when the full player squad is outside the trigger area (which matches the size of the base). Still, if anyone knows how BIS did their fancy map-zoom trick, it would be nice to know how. (I doubt I am the only person looking to apply their solution in my missions)


Author Message


Posts: 1
Rank:


Level: Member

Country: au
Location:
Occupation:
Age:
In-game name: [TFD] Jam Toast

 
#4 Posted at 2015-07-13 05:59        
     
Got this working with BIS_fnc_isInZoom.

OnPlayerRespawn.sqf:
{

[ _x ] execVM "fadeMarker.sqf";

} forEach [ "Marker_One" , "Marker_Two" ];

fadeMarker.sqf:
_marker = _this select 0;

while { time > 1 } do {

	if ( [ 0 , 500 ] call BIS_fnc_isInZoom ) then {
	
			_marker setMarkerAlpha 1;
			
		} else {
		
			_marker setMarkerAlpha 0;
			
		};
		
	sleep 2;
	
};

This doesn't fade so much as cause the markers to pop in after a small delay.