• 🏆 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!

[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