• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] How To use x/y in DisplayTextToPlayer()

Status
Not open for further replies.
Level 14
Joined
Jul 1, 2008
Messages
1,314
Hey Guys,

i have a maybe simple question about the function

JASS:
native DisplayTextToPlayer          takes player toPlayer, real x, real y, string message returns nothing

How can i use the coordinates x and y? When i fill in 0, its the default position of all Textmessages, but when i try to move the TextMessage on the screen, i dont know, what to fill in.
Its somehow not the real coordinates of the map...

Thanks for your help ;)
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
The x and y isn't the coordinates for the map, but for the screen. if both x and y is 0 it will be displayed at the default location, but if x = 2 and y = 0 it will be pushed to centre of the screen or something around there on the x axis (I think).
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
Thank you alot for giving me an idea about the dimensions!
I tested it with 0.2 steps and this came out:

x: around 11*0.2 = 2.2 is the wide of the screen
y: around 7*0.2 = 1.4 is the height of the screen

[SOLVED]
 
Last edited:
Status
Not open for further replies.
Top