• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Player's name in ingame text like in DotA?

Status
Not open for further replies.
Ah, i've forgotten to tell, for smooth use this to get player name:
  • Set string = (Name of Player 1 (Red))
'string' is a variable here. and then:
  • Game - Display to (All players) the text: (string + ( has pawned + (Name of Player 2 (Blue))))
You can use this for namy players.

Egzample in previous post will do that too, however variable will be better anyways.
 
You use the native which returns a string of the name of a certain player in combination with string concatination with constant strings.

  • Game - Display to (All players) the text: ((Name of Player 1 (Red)) + ( has pawned + (Name of Player 2 (Blue))))
Is a conmbination of strings with certain players? Don't say me that you looked only on second egzample, I just wanted to show that he can also use variable strings, becasue meaby he also needs players name for other stuff.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,239
Utalizating variables is part of the implimentation, the principle still remains the same. What you are advising him to do is cahce intermitent results to reduce coupling and improve perofrmance in the case that the player name is needed multiple times in the same procedure.
 
Status
Not open for further replies.
Top