• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Mapping] Ping Mini-map in a very simple way using coordinates

Ping Mini-map Using Coordinates

Difficulty: 0.5/10

Introduction:
This tutorial covers the basic of Pinging Mini-map using static coordinates only and does not involve to teach you when a unit or something is moving.
I dont know if there's already a tutorial like this but I've decided to post it anway :).

Direct to the point:
Usually in GUI, when we ping the Mini-map, it involves creating a location then we trigger like this;
  • Set point = (Position of SOMETHING)
  • Cinematic - Ping minimap for (All players) at point for 1.00 seconds
  • Custom script: call RemoveLocation(udg_point)
In JASS, it's much more simple:
JASS:
//If it's a unit
//If it's not a unit then we will get also the X and Y of something
local unit u = UNIT
call PingMinimap(GetUnitX(u), GetUnitY(u), duration real)

But how to do it even more simplier than the above codes wihout using locations and calling another native?

Well, this is the point...look below at the the bottom left side of your main WE window, you can see like this.
167625-albums4053-picture48069.jpg


As you can see, there is something written there like "Point: (-1560.8, -1022.0, 0.0)"

The -1560.8 is the X of the Map/Mini-map
The -1022.0 is the Y of the Map/Mini-map
The 0.0 is the Z of the Map/Mini-map (but forget about this)

Now you can code it using the native PingMinimap again like this;
JASS:
call PingMinimap(-1560, -1022, 1.0) //1.0 is a duration, not the Z.

or you can do it using custom script
  • Custom script: call PingMinimap(-1560, -1022, 1.0)
As you have noticed, I have removed the .8 and .0 respectively but that doesnt matter.

How do I change or get another value/point?
X, Y, Z (forget the Z) are the coordinates of the map when you move your mouse from the WE main window,
Just move your mouse in your WE then the value will change.
Well that's all, please comment, thanks.

Additional use of this method:
You can create units/effects using this method as well.
JASS:
local unit u = CreateUnit(Player(0), 'hfoo', -1560, -1022, 0.0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", -1560, -1022))

To create units/effects at random point in the map.
JASS:
local unit u = CreateUnit(Player(0), 'hfoo', GetRandomReal(-1560,1000), GetRandomReal(-1022,1000), 0.0)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", GetRandomReal(-1560,1000), GetRandomReal(-1022,1000)))

Note: Please don't judge my english coz I'm really not good at it :)
 
Last edited:
Don't worry, since your english is understandable, it's ok :)
Note: Please don't judge my english coz I'm really not good at it :)

-> cause ;)

But how to do it even more simplier than the above codes wihout using locations and calling another native?

-> Can it be simpler than that? Yes! With the below strategy, you don't need to use any handles at all :D

This looks like a good tutorial :)
Using direct coordinates makes your maps SUPER EFFICIENT :D
 
Hmm.. I might need some outside opinions. This seems like a pretty basic topic, and not broad enough to expand upon. :p It is a good tutorial though.

Anyway, as for the tutorial, you might want to mention that the (X,Y,Z) shown in the editor are the coordinates of the point that you currently have your mouse hovered over. Just for clarification. ;)
 
Hmm.. I might need some outside opinions. This seems like a pretty basic topic, and not broad enough to expand upon. :p It is a good tutorial though.
Yeah pretty basic that's why I mentioned "Difficulty: 0.5/10" :)...

Anyway, as for the tutorial, you might want to mention that the (X,Y,Z) shown in the editor are the coordinates of the point that you currently have your mouse hovered over. Just for clarification. ;)

Thanks, Fixed and I added more uses of that method...
 
Level 2
Joined
Aug 3, 2011
Messages
12
How about integrating the other uses and functions of the mini map itself (albeit it being basic) to add substance to the tut? Like Toggle Terrain and its relative usefulness and stuff like that. Also, I believe there was something about customizing the mini map? Add those, then it would be more wholesome. Just my opinion :grin:
Otherwise, great tip, if not tut :thumbs_up:
 
While this is a solid tutorial and explained very well, I don't think the topic is broad enough to support a tutorial. (unless you explain the logistics of pinging or something weird like that, lol)

I'm going to graveyard it, but thanks for the contribution. :) I'm sure it will serve equally well as a link-back for any pinging-related questions.

~Graveyarded.
 
Top