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

[Solved] Displaying text like it would be from chat?

Status
Not open for further replies.
Level 22
Joined
Feb 3, 2009
Messages
3,292
I'm trying to make the string which you can see in the bellow trigger be writen where normal in game chat messages are. adding \n gets me to the same height, but it's still a lot more right than game chat.

  • Say
    • Events
      • Player - Player 1 (Red) types a chat message containing -say as A substring
      • Player - Player 2 (Blue) types a chat message containing -say as A substring
      • Player - Player 3 (Teal) types a chat message containing -say as A substring
      • Player - Player 4 (Purple) types a chat message containing -say as A substring
      • Player - Player 5 (Yellow) types a chat message containing -say as A substring
      • Player - Player 6 (Orange) types a chat message containing -say as A substring
      • Player - Player 7 (Green) types a chat message containing -say as A substring
      • Player - Player 8 (Pink) types a chat message containing -say as A substring
      • Player - Player 9 (Gray) types a chat message containing -say as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -say as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -say as A substring
      • Player - Player 12 (Brown) types a chat message containing -say as A substring
    • Conditions
    • Actions
      • Custom script: set udg_TempString = "\n\n\n\n\n"
      • Game - Display to (All players) for 15.00 seconds the text: ((TempString + [Global] |cff) + (Player_Colours[(Player number of (Triggering player))] + ((Name of (Triggering player)) + (:|r + (Substring((Entered chat string), 6, 50))))))
 
You should use custom script and manipulate the x,y coordinates in the function DisplayTimedTextToPlayer

0, 0 is the default and everybody uses it, but you could something slightly different to reposition the text.

Something like 0.52, 1.00 makes the text display where Warcraft III displays stuff like "Must target a unit"
 
Status
Not open for further replies.
Top