TIGSource Forums

Developer => Technical => Topic started by: makerimages on November 17, 2012, 04:26:57 AM



Title: NEED GM minimap help
Post by: makerimages on November 17, 2012, 04:26:57 AM
Hi, i need some GM help, im making a minimap, with views, theres a thing i wannna get rid of

1.The gui and cursor displaying in the minimap

the screen looks like this (map in top right corner):
(http://i46.tinypic.com/29fcq2v.jpg)

thank you so much, if you are able to help me get rid of that.


Title: Re: NEED GM minimap help
Post by: Gord on November 17, 2012, 08:20:19 AM
I'm going to assume you're using two different views, one for the game, and one for the minimap.
Well, in the draw code for the hud, only let it draw in the game view, eg.

Code:
if (view_current == 0){
// draw hud
}else{
// don't draw hud
}


Title: Re: NEED GM minimap help
Post by: makerimages on November 18, 2012, 01:41:26 AM
thanks, but now i still have got problems.

1. the cursor still shows up on the minimap.
2. When i move my mouse over the minimap everything is ruined, i get a phantom cursor and its just weird(try it out yourself).

How should i go about fixing those??


Title: Re: NEED GM minimap help
Post by: copernicus on November 18, 2012, 07:31:36 AM
You need to disable GM's draw the cursor option.  Then you need to create an object for the cursor and your own sprite for it.  In the step event of the cursor object set the cursor object to the mouse_x and mouse_y.  In the draw event add additional parameters so that the cursor object isn't drawn in the minimap area.

if obj_cursor.y < view_yview + minimap_height {
if obj_cursor.x < view_xview + view_wview - minimap_width {
 //draw code
}}
if obj_cursor.y > view_yview + minimap_height {
 //draw code
}