- Joined
- Mar 10, 2009
- Messages
- 5,016
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;
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.
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;
or you can do it using custom script
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.
To create units/effects at random point in the map.
Note: Please don't judge my english coz I'm really not good at it
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)
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.
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)
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: