Jump to content
Atlas1205

Need some help with the strategic map fast travel system

Recommended Posts

So I managed to get it to work with pre-defined "missions" as destinations.

_destinations = SAFEHOUSE_LOCATION_ARRAY;

_parentDisplay 	= [] call bis_fnc_displayMission;
_mapCenter 	= (getpos player);
_ORBAT 		= [];
_markers 	= [];
_images 	= [];
_overcast 	= overcast;
_isNight 	= !((dayTime > 6) && (dayTime < 20));
_scale		= 1;
_simul		= true;

[
findDisplay 46,
_mapCenter,
_destinations,
_ORBAT,
_markers,
_images,
_overcast,
_isNight,
_scale,
_simul
] call Bis_fnc_strategicMapOpen;

and the SAFEHOUSE_LOCATION_ARRAY is such:

SAFEHOUSE_LOCATION_ARRAY = [
	[getpos sh_1,player setpos (_this select 0),"Safehouse 1","","","",1,[]],
	[getpos sh_2,player setpos (_this select 0),"Safehouse 2","","","",1,[]]
];
SAFEHOUSE_LOCATION_ARRAY;
publicVariable "SAFEHOUSE_LOCATION_ARRAY";

The two spots work correctly as i could Addaction to any object and open up the strategic map for fast travel to these two locations. However, if i want to add another location by using Pushbackunique, after the game has started, something ugly happens:

SAFEHOUSE_LOCATION_ARRAY pushBackUnique [

	[getpos sh_3,player setpos (_this select 0),"Safehouse 3","","","",1,[]]
];
SAFEHOUSE_LOCATION_ARRAY;
publicVariable "SAFEHOUSE_LOCATION_ARRAY";

33xtp1f.jpg

 

As you can see, the 3rd location refuses to show up and a script error pops up. So I looked at the line 444 part of that script:

		_map drawIcon [
			_texture,
			[1,1,1,_alpha],
			_pos,
			_size,
			_size,
			_dir,
			if (BIS_fnc_strategicMapOpen_showIconText) then {" " + _title} else {""},
			2,
			0.08,
			"PuristaBold"
		];
	} foreach BIS_fnc_strategicMapOpen_missions;

The _texture has something to do with ORBAT, maybe. the color, alpha and pos should already haven been defined in the first script. I have no idea why it doesn't work.

Can anyone help me please?

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

×