0
\$\begingroup\$

I am making a game in which I have created a minimap using views. I want in the minimap (the copy of the world) to add an object, but I want it to be visible only from the minimap. Is there any way to do this?

Any help is much appreciated.

\$\endgroup\$

2 Answers 2

0
\$\begingroup\$

In the Draw Event of the object you want to draw in the minimap only, if the minimap has view index 1 (assuming the main view with index 0 is what the player is actually seeing) you can simply write:

// Draw event for minimap-only object
if (view_current==1)
{
    // Draw event for this object
    // for minimap only (view 1)
}
else
{
    // Draw onto any other view (only if needed)
}

This way the Draw Event of your object will draw only in the view with index 1, your minimap.

\$\endgroup\$
0
0
\$\begingroup\$

Is it an object that exists in the game as well, even while it's not visible? If so then could you use that object to draw a sprite on the mini-map?

\$\endgroup\$
2
  • \$\begingroup\$ Yeah, it IS an object that is visible from the minimap. But, as I said it is located on the minimap area and as a result, it is visible also from the main view, so I want to make it visible ONLY from the minimap. \$\endgroup\$ Commented May 23, 2016 at 8:20
  • \$\begingroup\$ Hrmm, could you possibly post a screenshot? Sorry, but I'm having a hard time fully understanding what you mean. \$\endgroup\$
    – Tohzt
    Commented May 26, 2016 at 16:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .