Hello all. I believe I can send you in the right direction. Please look at my code below for my minimap and I can explain what I am doing here too.

First, declare your variables:
Code:
BMAP player_pointer = "textures//icon_player.tga";
BMAP map_border = "textures//map_border.tga";
BMAP admin_map = "textures//admin_map.bmp";
BMAP finish_flag = "textures//icon_finish.tga";


-The player pointer is a little dot in a 32BIT TGA file so the portions of the circle are transparent.

-The Map Border is to clean up the window to make it have a solid border like a picture frame

-The admin map is the actual map. I think this image of the map was approx 1000x1000 pixels, but don't hold me to it.

-The finish flag showed a checkered flag of the finish point of the map

Second declare a few panels for the map, border and window
Code:
PANEL pnlMapBorder{
	bmap = map_border;
	pos_x = 0;
	pos_y = 0;
	layer = 1;
	flags = OVERLAY;
}

PANEL pnlPlayerIcon{
	bmap = player_pointer;
	pos_x = 75;
	pos_y = 75;
	layer = 3;
	flags = OVERLAY;
}

PANEL pnlFinishIcon{
	bmap = finish_flag;
	pos_x = 0;
	pos_y = 0;
	layer = 3;
	flags = OVERLAY;
}
PANEL pnlAdminMap{
	pos_x = 0;
	pos_y = 0;
	layer = 0;
	window(0,0,175,175,admin_map,player_map_x,player_map_y);
}


-The map border is going to be second from the bottom, so use the layer of 1

-The player icon is the very top of this map, so make it a layer 3

-The finish icon also is on the top layer, it shows a checkered flag

-Admin map is the very bottom of this panel, it sits under all other layers


Below is my function that runs in a loop the entire time the player is in game or is moving.
Code:
function update_map(){
//SOME CODE
  //Rotate player icon for pointing
  pnlPlayerIcon.angle = my.pan;
 
  //Update position on map for player
   if(player.x <= 14672){
    player_map_y = (420 - ((((my.x + reference_x) / 27800)* 100) * 4.2)) - 150;
   }
   else{
    x_compensation = 75 - (((player.x/12578)) * 75);
    if(player.x < 27250){
     pnlPlayerIcon.pos_y = 75 + x_compensation;
    }
   }
   if(player.y <= 0){
    player_map_x = (((((abs(my.y) + reference_y) / 21000)* 100) * 4.2)) - 55;
   }
   else{
    y_compensation = ((player.y/3000)) * 75;
    if(player.y < 3000){
     pnlPlayerIcon.pos_x = 75 - y_compensation;
    }
   }
//SOME CODE
}



As for the finish flag, you will need to develop code similar to what is above and keep it in the window (even if it is on the border). This minimap is similar to the GTA versions where you find jobs.

Also, you will need to find out how big your map is by tracing the distance from one side to another, it will need to be a rectangle type...this is where I am getting my 278000 and 21000 numbers above. I just used F11 and did a small subtraction to find how big my map was.

Basically, find the size of your minimap in pixesl 1000x1000 or similar, then find out how big your level is. All you need to do now is just do a relational math equation. If your player is physically 67% across the map on the X axis, then your minimap should show 67% moved. Use the numbers to compensate 4.2. You will need to play with some numbers here as you test to compensate the player icon to always be in the center of the minimap...this code will allow your minimap to stop moving if the player gets to the edge of a map, and allow the player icon move freely to be truly at the border texture.

Hope this puts you in the right direction...good luck.

By the way, how would you feel about me writing an official guide to minimaps?


Current Project: Computer Repair Simulator
https://www.computer-repair-simulator.com