• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to center text

Status
Not open for further replies.
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.
 
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:
  • 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.
 
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:
 
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?
 
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.
Back
Top