• 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.

[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