Mr H. 393 Posted September 20, 2018 Hi guys! I'm trying to replace the map by a custom image whenever players open their map. What I have so far allows me to create the pic when the map is opened and works, but the trouble is it is shown over every other layer, while what I'd like to do would be to place it just above the map, but behind everything else so that players can see everything else, (tasks, briefing etc.). Any insight will be greatly appreciated. Here's what I have so far: findDisplay 46 displayAddEventHandler ["KeyDown", { if (inputAction "showMap" >0) then { _x = -0.00531249 * safezoneW + safezoneX; _y = -0.00399999 * safezoneH + safezoneY; _w = 1.01063 * safezoneW; _h = 1.008 * safezoneH; _ctrl = findDisplay 12 ctrlCreate ["rscPicture", 1000]; _ctrl ctrlSetPosition [_x,_y,_w,_h]; _ctrl ctrlSetText "media\img\splashscreen1.paa"; _ctrl ctrlCommit 0; }; }]; Share this post Link to post Share on other sites
HazJ 1287 Posted September 20, 2018 You can create it on the map itself. (findDisplay 12) // Display (findDisplay 12 displayCtrl 51) // Map Not sure if it will save when closing but if it doesn't then you can just use Map EH to do it again. 1 Share this post Link to post Share on other sites
Mr H. 393 Posted September 20, 2018 I have tried and it doesn't work. The map control is rscMapControl not rscPicture. Doing ((Find display 12)displayctrl 51) ctrlSetText "mypic.paa"; yielded strange effects but not the intended one. Share this post Link to post Share on other sites
HazJ 1287 Posted September 20, 2018 Like this? _x = SafeZoneXAbs; _y = SafeZoneY + 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25); _w = SafeZoneWAbs; _h = SafeZoneH - 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25); _ctrl = (findDisplay 12) ctrlCreate ["RscBackground", 1000]; _ctrl ctrlSetPosition [_x, _y, _w, _h]; _ctrl ctrlSetText ""; _ctrl ctrlCommit 0; 1 Share this post Link to post Share on other sites
Mr H. 393 Posted September 20, 2018 I'maway from my computer but I'll report back tomorrow Share this post Link to post Share on other sites
Mr H. 393 Posted September 21, 2018 This creates a background, but doesn't allow to set it with a custom picture I'm afraid! Share this post Link to post Share on other sites
HazJ 1287 Posted September 21, 2018 You can can use RscPicture instead. Share this post Link to post Share on other sites
Mr H. 393 Posted September 21, 2018 I have. But the picture will get in front of everything else and hide all the menus. I have also tried to create a controls background group and then an rscpicture within but it wouldn't show. Share this post Link to post Share on other sites
Larrow 2695 Posted September 21, 2018 What about high jacking the BriefingIntroGraphicsLayer? although it is RscPictureKeepAspect so all depends on what the image is you are trying to show. addMissionEventHandler [ "Map", { params ["_mapIsOpened", "_mapIsForced"]; _briefingPicture = findDisplay 12 displayCtrl 1101; if ( _mapIsOpened ) then { _briefingPicture ctrlShow true; _briefingPicture ctrlSetText "\a3\ui_f\data\logos\arma3_splash_ca.paa"; }; }]; 3 Share this post Link to post Share on other sites
Mr H. 393 Posted September 22, 2018 I It yields ALMOST the desired result but alas I can't resize the control. findDisplay 46 displayAddEventHandler ["KeyDown", { if (inputAction "showMap" >0) then { _x = SafeZoneXAbs; _y = SafeZoneY + 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25); _w = SafeZoneWAbs; _h = SafeZoneH - 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25); /* _ctrl = (findDisplay 12) ctrlCreate ["ControlsBackground", 1000]; _ctrl ctrlSetPosition [_x, _y, _w, _h]; _ctrl ctrlSetText ""; _ctrl ctrlCommit 0; _ctrl2 = (findDisplay 12) ctrlCreate ["RscPicture",1001, ((findDisplay 12) displayCtrl 1000)]; _ctrl2 ctrlSetPosition [_x, _y, _w, _h]; _ctrl2 ctrlSetText "media\img\splashscreen1.paa"; _ctrl2 ctrlCommit 0; */ _briefingPicture = findDisplay 12 displayCtrl 1101; _briefingPicture ctrlSetPosition [_x, _y, _w, _h]; _briefingPicture ctrlCommit 0; _briefingPicture ctrlShow true; _briefingPicture ctrlSetText "media\img\embassy1.paa"; }; }]; Share this post Link to post Share on other sites
1212PDMCDMPPM 200 Posted September 22, 2018 I worked on a similar project to replace the map itself. I went the "marker way" with good result: Share this post Link to post Share on other sites
Mr H. 393 Posted September 22, 2018 Yes but this would require to make an addon. And the texture would have to be included inside the addon correct? I'd like to do something more versatile. Anyhow your way is very cool too. Share this post Link to post Share on other sites
1212PDMCDMPPM 200 Posted September 22, 2018 Yes, correct. IIRC (it's 2 years old), I managed to do a script version but the new map "texture" was above the player added markers so it was useless for my planned use. Share this post Link to post Share on other sites
Larrow 2695 Posted September 22, 2018 15 hours ago, Mr H. said: It yields ALMOST the desired result but alas I can't resize the control. The control is already the size of the screen... x="safezoneXabs"; y="safezoneY"; w="safezoneWabs"; h="safezoneH"; ...as I said its a RscPictureKeepAspect which is causing the issue. I presume you want it to fill the whole screen? You can always resize your actual image file to say 1024x512 so it takes up more of the screen area. Then use the other layer available in the map screen BriefingIntroBackgroundLayer which is a RscText and color its background to something near to your paper background or even white to make it look like its on a whiteboard? addMissionEventHandler [ "Map", { params ["_mapIsOpened", "_mapIsForced"]; _briefingBackground = findDisplay 12 displayCtrl 1102; _briefingPicture = findDisplay 12 displayCtrl 1101; if ( _mapIsOpened ) then { _briefingBackground ctrlShow true; _briefingBackground ctrlSetBackgroundColor[ 0.161, 0.388, 0.576, 1 ]; _briefingPicture ctrlShow true; _briefingPicture ctrlSetText "images\blueprints.paa"; }; }]; Remember im on 21:9 here so there is more screen space, but you will want to resize your image for a common denominator so it fits 16:9. Cannot really see anyone using 4:3 nowadays but you never know. 2 1 Share this post Link to post Share on other sites
Mr H. 393 Posted September 22, 2018 Yup my picture is a 1024*1024 paa, it is correctly resized everywhere else I didn't know there were RscPictureKeepAspect! Your screenshot looks like what I'm trying to get. Setting the background color is also a great idea. I will try it like this. Thanks @Larrow (and everyone else who shared their ideas and comments). Share this post Link to post Share on other sites
Mr H. 393 Posted September 22, 2018 Here's the result! I have some tweaking to do but it looks like what I was aiming at. 2 Share this post Link to post Share on other sites
neman.ekd 20 Posted December 4, 2019 Hello Mates ...Thanks for the Amazing Workaround on map replacement... I was wondering where do these codes gonna be written in the first place ? Share this post Link to post Share on other sites