Yeah, yall probably hardly remember me, but in case you do: Hello.
Anyway, I was wondering if anyone knew how to make a map that goes in the corner of the screen and acts as sort of a radar that shows where the characters are on the map.
I can't think of the exact events to do this off the top of my head, but here's the basic idea. You want to have a central white dot or something to represent the player on your mini-map (which can be just a black square set to the top layer w/0 scrolling). Then, say green dots for the enemies (or whatever). In order to place them in the right spot, you basically find the x and y positions of the enemies relative to the player, then divide that distance by a factor of 20 or so (whatever you need to -- play with this number). Then, display the green dots at whatever that value is away from the white dot. Set their positions each time MMF loops (use a fastloop to determine how many green radar dots you'll need and which one partains to which enemy. Finally, have an event that basically just says that if the dot is outside the boundries of the radar, make it invisible.
XBL Gamertag: Rampant Mjolnir
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
27th January, 2004 at 03:53:33 -
Tigerworks also has a seperate tutorial on his site that doesn't use that extension doesn't he?
Just set the X and Y positions of your 'minimap' representative of the player to the division of the X and Y positions of the actual player and the shrink ratio of the minimap.
So if you minimap's dimensions are 1/10th the size of the actual map, then you would have:
Set X of minimapPlayer to (X of actualPlayer/10)
Set Y of minimapPlayer to (Y of actualPlayer/10)
Hehe yeh you need to take the position of the screen into account etc, but yeh you figured that out.
You dont HAVE to use fastloop, but if you have a lot of little dots, I would recommend using fastloop to cycle through them quickly to make it accurate.
Yeh I guess fastloop isnt necessary, Im just obsessed with them . I was kind of thinking for like 40-300 units type of thing. And if you used fastloop you could garentee they are all positioned at an exact step in the event loop, etc which might be required for certain things, blah blah...(realises that this is irrelevant)