B
bluGecko
Guest
Hi,
My current project is a top down shooter. I have an NPC object which I would like to have displayed on a Radar/Minimap. I would like the NPC object to be represented as a red square on said Radar/Minimap.
I have tried many different solutions that i have come across online. All of them do what I need, except for one big issue. They only work in the "Draw" event. Is there any way at all to have a Radar/Minimap drawn by using the "Draw GUI" event???
Thank you in advance
Here is an example of the code I was trying to use:
My current project is a top down shooter. I have an NPC object which I would like to have displayed on a Radar/Minimap. I would like the NPC object to be represented as a red square on said Radar/Minimap.
I have tried many different solutions that i have come across online. All of them do what I need, except for one big issue. They only work in the "Draw" event. Is there any way at all to have a Radar/Minimap drawn by using the "Draw GUI" event???
Thank you in advance
Here is an example of the code I was trying to use:
Code:
var d,a,radarX,radarY;
radarX = obj_player.x;
radarY = obj_player.y;
with(obj_npc)
{
d = point_distance(radarX,radarY,x,y);
if(d <= 600) // This is the distance to check for
{
d = d/600*75;
a = point_direction(radarX,radarY,x,y)
draw_sprite(spr_radar_npc, 0, 75 + lengthdir_x(d,a), 600 + lengthdir_y(d,a));
}
}
Last edited by a moderator: