S
Sypher714
Guest
Final Result for NON ROTATING Minimap.
You may use the code if you like, located under this screenshot. Otherwise if you are here to help out on my 2nd problem start scrolling down.
Code if anyone is interested. 2 Objects required, written in BOLD. This is just my setup, I am not sure if it is a correct method but it works fine for me.
NOTICE - the appearing icons in the radar isn't included in this code.
You may use the code if you like, located under this screenshot. Otherwise if you are here to help out on my 2nd problem start scrolling down.
Code if anyone is interested. 2 Objects required, written in BOLD. This is just my setup, I am not sure if it is a correct method but it works fine for me.
NOTICE - the appearing icons in the radar isn't included in this code.
par_minimap
Assign objects you want to be seen in Minimap to this parent. Or if your object(s) already have a parent assigned, assign the parent to this parent.
obj_minimap
Code://Create /// Init oSurface = -1; //Step //Your Values can be optional. This is what i am currently using. if (!surface_exists(oSurface)) { oSurface = surface_create(400, 400); } surface_set_target(oSurface); draw_clear(c_white); //This part is optional draw_set_alpha(0.7); draw_background_tiled(bg, 0, 0); draw_set_alpha(1); //Get objects for population on map var numObjects = instance_number(par_minimap) for ( var i = 0; i < numObjects; i++ ) { var obj = instance_find( par_minimap, i ); var _px = obj_player.x var _py = obj_player.y with(obj) { draw_sprite( sprite_index, 1, x+200 - _px, y+200 - _py); } } surface_reset_target(); //Draw GUI if (surface_exists(oSurface)) { //Your Values can be optional. This is what i am currently using. draw_surface_stretched( oSurface, 0, 60, 200, 200 ); var old = draw_get_color(); // Get underlay color. draw_set_color(c_white); //Your Values can be optional. This is what i am currently using. draw_rectangle( 0, 60, 200+0, 200+60, true); draw_set_color(old); }
Last edited by a moderator: