Imperial
Member
Hello
I'm trying to make a minimap that redraws Everything but In Specific zone
this is what I have so far
the problem with this minimap is It's just re-draws everything in the map not just a small portion
can you please show me how to make It to re-draw just a small portion of the map ?
Just a small zone where the player is standing
I'm trying to make a minimap that redraws Everything but In Specific zone
this is what I have so far
Code:
var minimap_x = argument0;
var minimap_y = argument1;
var minimap_xscale = sprite_get_width(spr_MiniMap_Background)/room_width;
var minimap_yscale = sprite_get_height(spr_MiniMap_Background)/room_height;
var scale = 5;
var playerX = 0;
var playerY = 0;
draw_sprite(spr_MiniMap_Background,0,minimap_x,minimap_y);
if(instance_exists(Player))
{
playerX = Player.x * minimap_xscale;
playerY = Player.y * minimap_yscale;
draw_sprite_ext(spr_player,0,minimap_x + playerX,minimap_y + playerY,minimap_xscale * scale,minimap_yscale * scale,Player.image_angle,-1,1);
}
for(i = 0; i < instance_number(Enemy); i++)
{
var current = instance_find(Enemy,i);
xx = current.x * minimap_xscale;
yy = current.y * minimap_yscale;
draw_sprite_ext(spr_enemy,0,minimap_x + xx,minimap_y + yy,minimap_xscale * scale,minimap_yscale * scale,current.image_angle,-1,1);
}
for(i = 0; i < instance_number(Tree); i++)
{
var current = instance_find(Tree,i);
xx = current.x * minimap_xscale;
yy = current.y * minimap_yscale;
draw_sprite_ext(spr_tree,0,minimap_x + xx,minimap_y + yy,minimap_xscale * scale * 0.25,minimap_yscale * scale * 0.25,current.image_angle,-1,1);
}
can you please show me how to make It to re-draw just a small portion of the map ?
Just a small zone where the player is standing