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

How to center text

Status
Not open for further replies.
Level 20
Joined
Jul 6, 2009
Messages
1,885
Sorry for not elaborating, i was in a hurry when i wrote that post.
Since you're, i guess, a GUI user, you should do it like this:
  • Custom script: call DisplayTimedTextToPlayer(player, x, y, duration, message)
Instead of player, either type Player(player number) where 'player number' is different from GUI, player red's number is 0, blue's 1, teal's 2 etc...
or you can put a player variable there (remember to type it udg_ prefix: udg_variablename).
For message, type it within quotes " " or use a variable.
Other parameters are reals which you normally type.

If you want to display the message to multiple players, just loop through a player group (force) and add that line to it.
 
Level 4
Joined
May 22, 2011
Messages
68
Sorry for not elaborating, i was in a hurry when i wrote that post.
Since you're, i guess, a GUI user, you should do it like this:
  • Custom script: call DisplayTimedTextToPlayer(player, x, y, duration, message)
Instead of player, either type Player(player number) where 'player number' is different from GUI, player red's number is 0, blue's 1, teal's 2 etc...
or you can put a player variable there (remember to type it udg_ prefix: udg_variablename).
For message, type it within quotes " " or use a variable.
Other parameters are reals which you normally type.

If you want to display the message to multiple players, just loop through a player group (force) and add that line to it.

can u make a map for me?? thx text center thingy please? ?:ogre_rage:




or is this right??



  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing aa as An exact match
    • Conditions
    • Actions
      • Set PlayerVariable = (All players)
      • Set x_playerText = 500.00
      • Set y_playerText = 250.00
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Custom script: call DisplayTimedTextToPlayer(udg_PlayerVariable, x_playerText, y_playerText, 10, "LOOOOOOL")
 
Last edited:
Level 20
Joined
Jul 6, 2009
Messages
1,885
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing aa as An exact match
    • Conditions
    • Actions
      • Set PlayerVariable = (All players)
      • Set x_playerText = 500.00
      • Set y_playerText = 250.00
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Custom script: call DisplayTimedTextToPlayer(udg_PlayerVariable, x_playerText, y_playerText, 10, "LOOOOOOL")
Change it to this
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing aa as An exact match
    • Conditions
    • Actions
      • Set x_playerText = 500.00
      • Set y_playerText = 250.00
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set PlayerVariable = (Picked Player)
          • Custom script: call DisplayTimedTextToPlayer(udg_PlayerVariable, udg_x_playerText, udg_y_playerText, 10, "LOOOOOOL")
You can also directly type the coordinates like in
  • Custom script: call DisplayTimedTextToPlayer(udg_PlayerVariable, 500.00, 250.00, 10, "LOOOOOOL")
EDIT: Also, you gotta add small values around 1 for coordinates, like Maker said.
For example, call DisplayTimedTextToPlayer(udg_PlayerVariable, 1.00, 1.00, 10, "LOOOOOOL") would display it a bit below time indicator.
 
Level 4
Joined
May 22, 2011
Messages
68
Change it to this
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing aa as An exact match
    • Conditions
    • Actions
      • Set x_playerText = 500.00
      • Set y_playerText = 250.00
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set PlayerVariable = (Picked Player)
          • Custom script: call DisplayTimedTextToPlayer(udg_PlayerVariable, udg_x_playerText, udg_y_playerText, 10, "LOOOOOOL")
You can also directly type the coordinates like in
  • Custom script: call DisplayTimedTextToPlayer(udg_PlayerVariable, 500.00, 250.00, 10, "LOOOOOOL")
EDIT: Also, you gotta add small values around 1 for coordinates, like Maker said.
For example, call DisplayTimedTextToPlayer(udg_PlayerVariable, 1.00, 1.00, 10, "LOOOOOOL") would display it a bit below time indicator.

now working :ogre_rage:
 
Level 4
Joined
May 22, 2011
Messages
68
Change it to this
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing aa as An exact match
    • Conditions
    • Actions
      • Set x_playerText = 500.00
      • Set y_playerText = 250.00
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Set PlayerVariable = (Picked Player)
          • Custom script: call DisplayTimedTextToPlayer(udg_PlayerVariable, udg_x_playerText, udg_y_playerText, 10, "LOOOOOOL")
You can also directly type the coordinates like in
  • Custom script: call DisplayTimedTextToPlayer(udg_PlayerVariable, 500.00, 250.00, 10, "LOOOOOOL")
EDIT: Also, you gotta add small values around 1 for coordinates, like Maker said.
For example, call DisplayTimedTextToPlayer(udg_PlayerVariable, 1.00, 1.00, 10, "LOOOOOOL") would display it a bit below time indicator.
Edit
its working xd

another question? how to put your text below?? is there a code for it?
 
Level 4
Joined
May 22, 2011
Messages
68
219ulmr.jpg


in world editor is this the way to know the x,and y? :vw_wtf:

the point (the number thingy)
 
Status
Not open for further replies.
Top