Minimap drawing help!

Silux

  • Posts: 438
I made myself a minimap which shows all actor in scene with basic draw blocks.

Can i make an arrow icon which is pointed as the enemy?
example:the enemy is going toward me. in the minimap i see a red arrow pointed at me.

That is a preview of the actual minimap.
http://www.stencyl.com/game/play/8741

« Last Edit: December 31, 2011, 08:38:48 am by Silux »
Currently working at:
Starwarrior 2097(my main project)
How to make successful games in Kongregate and the world(article)

mukowAPPS

  • Posts: 78
I imagine you would have to set uP a ratio between mapsize/minimap size and the keep the minimap icon at a position relative to main char (taking into account the map size ratio)

Just keep the minimap icons rotation the same as the main char.

Abigayl

  • Posts: 807
Please phrase your question... as a question. I have no clue what aspect of making a minimap that you want help with!
If you need help, please check my tutorials either here or Kongregate (http://www.kongregate.com/accounts/Abigayl) or come over to my stream: http://www.livestream.com/poweredbyflowers

Silux

  • Posts: 438
Rephrased!

How i can set the x-center of the arrow to its position in the minimap?(there isn't a block for that!)
How i can make the arrow always stay in the same position of the enemy?
There is any block that 'draw' an actor at x and y coordinates?

« Last Edit: December 31, 2011, 09:01:56 am by Silux »
Currently working at:
Starwarrior 2097(my main project)
How to make successful games in Kongregate and the world(article)

Abigayl

  • Posts: 807
If the minimap is of your entire screen (and in the upper-left corner of the screen), try using division: "x-center of self / scene width (in pixels) * [width of minimap]" and so on (add numbers to it if the minimap is not in the upper-left, such as + 580 at the end if on the right side (assuming 640 screen width and 60 minimap width). I hope that makes sense.
If you need help, please check my tutorials either here or Kongregate (http://www.kongregate.com/accounts/Abigayl) or come over to my stream: http://www.livestream.com/poweredbyflowers

Silux

  • Posts: 438
Here in the attachment what i have done.

the minimap is 190px wide

Currently working at:
Starwarrior 2097(my main project)
How to make successful games in Kongregate and the world(article)

Alexin

  • *
  • Posts: 3130
There's scrolling in your game so you must subtract the camera's location when setting the arrow's location (screen > scene space).
"Find the fun"
alexin@stencyl.com

Silux

  • Posts: 438
in drawing is enough to switch to actor's space.

Well i managed to draw arrows on the screen, but they still point towards the 'wrong' direction.
(wrong from my point of view)

I'll update the link as soon as possible, showing the minimap
Currently working at:
Starwarrior 2097(my main project)
How to make successful games in Kongregate and the world(article)