Jump to content
Sign in to follow this  
xxanimusxx

Map control without contents

Recommended Posts

Hi there fellow Editors and Scripters,

I'm now working on a partial project of mine for some days and am already hitting rock bottom, can't find any information about my special issue on the net so I hope you can point me in the right direction.

What do I need?

I need a canvas covering the whole screen in which I can use the draw-functions (e.g. drawLine) to do some 2D drawings.

Why don't I just use conventional controls for that?

Sure, I could use RscPicture-Controls to achieve something like that, but you can't possibly rotate controls in ArmA2 and you also can't "follow" objects on the screen dynamically but using draw-functions.

What did I do already?

Well, I took RscMapControl and inherited it using an own class:

class miniMap : rscMapControl
{
idc = 999;
x = safezoneXAbs;
y = safezoneY;
w = safezoneWAbs;
h = safezoneH;
onDraw = "if (!isNil ""drawCallback"") then {_this call drawCallback;};";
};

So using the drawCallback I can easily draw something on the map.

So what's the problem here?

The main problem is, that I don't need any satellite-infos on my map; remember I told that I want an (empty) canvas to draw, something like an overlay.

So everything like roads, trees, see etc. should be hidden.

I could get rid of almost everything, setting the Alpha of colorSea, colorForst .. etc to zero.

But the roads and some map-placed pictures like airfields still stay where they originally were and if the player has Item_GPS in his inventory, the player's icon gets drawn as well.

After changing the type...

So I changed the type of RscMapControl from CT_MAP_MAIN to CT_MAP and got rid of the player's icon and other unnessecary stuff, but the fact remains that roads, airfields, city names and the border around the map stays.

So what now?

I don't know what to do anymore, there is almost next to nothing to find about Map controls in the Wiki or other sources, so I can't get a better picture about how the Map control works.

But I know it's possible, because I already saw someone make it:

I don't know whether it's a map or not, but I strongly assume it (draw-functions are expecting map-controls as a parameter to work).

And the last question...

Is it possible to add markers to my custom Map control instead of adding it to the main map? (I know there's the method of hiding them whenever the mainmap is being opened and show them once its closed but I want to avoid the extra work xD)

Share this post


Link to post
Share on other sites

Yeah I already looked into that (got to that somehow via google) but unfortunately it just replaces/adds a custom map functionality with everything working like the main map, which is the exact opposite what I'm searching for xD

But I still do experiments and I think I'm quite near at the solution but it would be easier and less nerve wrecking to have it shown to me :D

Any ideas concerning the last question? (adding markers to another map-control)

Share this post


Link to post
Share on other sites

Wait, do you want the map to be *blank*, or do you still want topo lines? If the former, you could cover the map with large markers; white rectangles (8-10 for full opacity) with dimensions that exceed the possible visible area will give you a truly blank white canvas to work with.

Good to see you're still here, btw!

Share this post


Link to post
Share on other sites

Hi Harzach, it's been a long time, I know ^^

No topo lines or other opaque elements on the map, having markers ontop of the map will give me a canvas alright, but that canvas will also be overlaying the whole screen, so while I paint something on it, the rest of the game will be pretty useless because the player can't see what's happening behind the canvas xD

What I want is a transparent layer on the whole screen on which I can paint on, like that in the youtube-video in my OP.

Share this post


Link to post
Share on other sites

Oh, durr - totally misunderstood what you are looking to do. Should have watched that video first. At this point I am way out of my depth, so best of luck!

Share this post


Link to post
Share on other sites

Animus -

I was doing some object placement in MCC Sandbox (Arma 3) earlier today when the thought occurred to me that the MCC 3D editor "compass" might be an example of what you are trying to accomplish. I may be completely mistaken , but perhaps it is worth a look? Assuming of course that A3-exclusive functions/commands aren't being used.

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
Sign in to follow this  

×